public class MckoiBuilder extends SqlBuilder
_log, SIZE_PLACEHOLDER
Constructor and Description |
---|
MckoiBuilder(Platform platform)
Creates a new builder instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createAutoIncrementSequence(Table table,
Column column)
Creates the sequence necessary for the auto-increment of the given column.
|
void |
createTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the table along with any non-external constraints as well
as with external primary keys and indices (but not foreign keys).
|
protected void |
dropAutoIncrementSequence(Table table,
Column column)
Drops the sequence used for the auto-increment of the given column.
|
void |
dropTable(Table table)
Outputs the DDL to drop the table.
|
String |
getSelectLastIdentityValues(Table table)
Generates the SQL for querying the id that was created in the last insertion
operation.
|
protected void |
processTableStructureChanges(Database currentModel,
Database desiredModel,
Table sourceTable,
Table targetTable,
Map parameters,
List changes)
Allows database-specific implementations to handle changes in a database
specific manner.
|
protected void |
writeColumnDefaultValue(Table table,
Column column)
Prints the default value of the column.
|
addEscapedCharSequence, alterDatabase, applyForSelectedChanges, areEqual, columnsDiffer, createExternalForeignKeys, createExternalForeignKeys, createTable, createTables, createTables, createTables, createTemporaryTable, createUniqueIdentifier, dropExternalForeignKeys, dropTable, dropTables, dropTemporaryTable, escapeStringValue, findCorrespondingForeignKey, getBareNativeType, getColumnName, getConstraintName, getDefaultValueHelper, getDeleteSql, getDelimitedIdentifier, getForeignKeyName, getIndent, getIndexName, getInsertSql, getMaxColumnNameLength, getMaxConstraintNameLength, getMaxForeignKeyNameLength, getMaxTableNameLength, getNativeDefaultValue, getNativeType, getPlatform, getPlatformInfo, getRealTargetTableFor, getSqlType, getTableName, getTemporaryTableFor, getUpdateSql, getValueAsString, getValueDateFormat, getValueLocale, getValueNumberFormat, getValueTimeFormat, getWriter, isValidDefaultValue, print, printComment, printDefaultValue, printEndOfStatement, printIdentifier, printIndent, println, println, printlnIdentifier, printStartOfEmbeddedStatement, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChanges, processTableStructureChanges, processTableStructureChanges, setIndent, setValueDateFormat, setValueLocale, setValueNumberFormat, setValueTimeFormat, setWriter, shortenName, shouldGeneratePrimaryKeys, writeCastExpression, writeColumn, writeColumnAutoIncrementStmt, writeColumnDefaultValueStmt, writeColumnNotNullableStmt, writeColumnNullableStmt, writeColumns, writeCopyDataStatement, writeEmbeddedForeignKeysStmt, writeEmbeddedIndexCreateStmt, writeEmbeddedIndicesStmt, writeEmbeddedPrimaryKeysStmt, writeExternalForeignKeyCreateStmt, writeExternalForeignKeyDropStmt, writeExternalIndexCreateStmt, writeExternalIndexDropStmt, writeExternalIndicesCreateStmt, writeExternalPrimaryKeysCreateStmt, writeForeignReferences, writeLocalReferences, writePrimaryKeyStmt, writeTableAlterStmt, writeTableComment, writeTableCreationStmt, writeTableCreationStmtEnding
public MckoiBuilder(Platform platform)
platform
- The plaftform this builder belongs topublic void createTable(Database database, Table table, Map parameters) throws IOException
createTable
in class SqlBuilder
database
- The database modeltable
- The tableparameters
- Additional platform-specific parameters for the table creationIOException
public void dropTable(Table table) throws IOException
SqlBuilder.dropTable(Database, Table)
if you want that.dropTable
in class SqlBuilder
table
- The table to dropIOException
protected void createAutoIncrementSequence(Table table, Column column) throws IOException
table
- The tablecolumn
- The columnIOException
protected void dropAutoIncrementSequence(Table table, Column column) throws IOException
table
- The tablecolumn
- The columnIOException
protected void writeColumnDefaultValue(Table table, Column column) throws IOException
writeColumnDefaultValue
in class SqlBuilder
table
- The tablecolumn
- The columnIOException
public String getSelectLastIdentityValues(Table table)
null
.getSelectLastIdentityValues
in class SqlBuilder
table
- The tablenull
if the database does not support thisprotected void processTableStructureChanges(Database currentModel, Database desiredModel, Table sourceTable, Table targetTable, Map parameters, List changes) throws IOException
AddPrimaryKeyChange
changes are
applied via an ALTER TABLE ADD CONSTRAINT
statement.processTableStructureChanges
in class SqlBuilder
currentModel
- The current database schemadesiredModel
- The desired database schemasourceTable
- The original tabletargetTable
- The desired tableparameters
- The creation parameters for the tablechanges
- The change objects for the target tableIOException
Copyright © 2016 Internet2. All rights reserved.