Class SQLAlterStatement
java.lang.Object
com.github.tadukoo.database.mysql.syntax.statement.SQLAlterStatement
SQL Alter Statement represents a MySQL Alter statement
- Version:
- Alpha v.0.3
- Author:
- Logan Ferree (Tadukoo)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe building part of building aSQLAlterStatementstatic interfaceThecolumn definitionpart of building aSQLAlterStatementstatic interfacestatic interfaceThe Column Name part of building aSQLAlterStatementstatic interfaceTheoperationpart of building aSQLAlterStatementstatic classA builder to use to build aSQLAlterStatement.static interfaceThe Table name part of building aSQLAlterStatementstatic interfaceThe Type part of building aSQLAlterStatement -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ColumnDefinitionThecolumn definitionto be usedprivate final StringThe name of the column to alterprivate final ForeignKeyConstraintTheforeign keyto be added to the tableprivate final SQLColumnOperationTheoperationto performprivate final StringThe name of the table to alterprivate final SQLTypeThetypeto be altered -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSQLAlterStatement(SQLType type, String tableName, SQLColumnOperation operation, String columnName, ColumnDefinition columnDef, ForeignKeyConstraint foreignKey) Constructs aSQLAlterStatementusing the given parameters -
Method Summary
-
Field Details
-
type
Thetypeto be altered -
tableName
The name of the table to alter -
operation
Theoperationto perform -
columnName
The name of the column to alter -
columnDef
Thecolumn definitionto be used -
foreignKey
Theforeign keyto be added to the table
-
-
Constructor Details
-
SQLAlterStatement
private SQLAlterStatement(SQLType type, String tableName, SQLColumnOperation operation, String columnName, ColumnDefinition columnDef, ForeignKeyConstraint foreignKey) Constructs aSQLAlterStatementusing the given parameters- Parameters:
type- Thetypeto be alteredtableName- The name of the table to alteroperation- Theoperationto performcolumnName- The name of the column to altercolumnDef- Thecolumn definitionto be usedforeignKey- Theforeign keyto be added to the table
-
-
Method Details
-
builder
- Returns:
- A new
SQLAlterStatement.SQLAlterStatementBuilderto build a newSQLAlterStatement
-
getType
- Returns:
- The
typeto be altered
-
getTableName
- Returns:
- The name of the table to alter
-
getOperation
- Returns:
- The
operationto perform
-
getColumnName
- Returns:
- The name of the column to alter
-
getColumnDef
- Returns:
- The
column definitionto be used
-
getForeignKey
- Returns:
- The
foreign keyto be added to the table
-
toString
-