public class Db2Builder extends SqlBuilder
_log, LINE_SEPARATOR, SIZE_PLACEHOLDER| Constructor and Description |
|---|
Db2Builder(Platform platform)
Creates a new builder instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dropColumn(Table table,
Column column)
Generates the SQL to drop a column from a table.
|
void |
dropIndex(Table table,
Index index)
Generates the statement to drop a non-embedded index from the database.
|
void |
dropPrimaryKey(Table table)
Writes the SQL for dropping the primary key of the given table.
|
protected String |
getNativeDefaultValue(Column column)
Returns the native default value for the column.
|
String |
getSelectLastIdentityValues(Table table)
Generates the SQL for querying the id that was created in the last insertion
operation.
|
protected void |
writeCastExpression(Column sourceColumn,
Column targetColumn)
Writes a cast expression that converts the value of the source column to the data type
of the target column.
|
protected void |
writeColumnAutoIncrementStmt(Table table,
Column column)
Prints that the column is an auto increment column.
|
addColumn, addEscapedCharSequence, areEqual, columnsDiffer, copyData, createForeignKey, createForeignKeys, createForeignKeys, createIndex, createIndexes, createPrimaryKey, createTable, createTable, createTables, createTables, createTables, createTemporaryTable, createUniqueIdentifier, dropForeignKey, dropForeignKeys, dropTable, dropTable, dropTables, dropTemporaryTable, escapeStringValue, getBareNativeType, getColumnName, getConstraintName, getDefaultValueHelper, getDeleteSql, getDelimitedIdentifier, getForeignKeyName, getIndent, getIndexName, getInsertSql, getMaxColumnNameLength, getMaxConstraintNameLength, getMaxForeignKeyNameLength, getMaxTableNameLength, getNativeType, getPlatform, getPlatformInfo, getSizeSpec, getSqlType, getSqlType, getTableName, getUpdateSql, getUpdateSql, getValueAsString, getValueDateFormat, getValueLocale, getValueNumberFormat, getValueTimeFormat, getWriter, isValidDefaultValue, print, printComment, printDefaultValue, printEndOfStatement, printIdentifier, printIndent, println, println, printlnIdentifier, printStartOfEmbeddedStatement, setIndent, setValueDateFormat, setValueLocale, setValueNumberFormat, setValueTimeFormat, setWriter, shortenName, shouldGeneratePrimaryKeys, writeAddIdentityColumnUsingAlterTable, writeColumn, writeColumnDefaultValue, writeColumnDefaultValueStmt, writeColumnNotNullableStmt, writeColumnNullableStmt, writeColumns, writeEmbeddedForeignKeysStmt, writeEmbeddedIndexCreateStmt, writeEmbeddedIndicesStmt, writeEmbeddedPrimaryKeysStmt, writeForeignKeyOnDeleteAction, writeForeignKeyOnUpdateAction, writeForeignReferences, writeLocalReferences, writePrimaryKeyStmt, writeTableAlterStmt, writeTableComment, writeTableCreationStmt, writeTableCreationStmtEndingpublic Db2Builder(Platform platform)
platform - The plaftform this builder belongs toprotected String getNativeDefaultValue(Column column)
getNativeDefaultValue in class SqlBuildercolumn - The columnprotected void writeColumnAutoIncrementStmt(Table table, Column column) throws IOException
writeColumnAutoIncrementStmt in class SqlBuildertable - The tablecolumn - The columnIOExceptionpublic String getSelectLastIdentityValues(Table table)
null.getSelectLastIdentityValues in class SqlBuildertable - The tablenull if the database does not support thispublic void dropColumn(Table table, Column column) throws IOException
table - The table where to drop the column fromcolumn - The column to dropIOExceptionpublic void dropPrimaryKey(Table table) throws IOException
table - The tableIOExceptionpublic void dropIndex(Table table, Index index) throws IOException
dropIndex in class SqlBuildertable - The table the index is onindex - The index to dropIOExceptionprotected void writeCastExpression(Column sourceColumn, Column targetColumn) throws IOException
writeCastExpression in class SqlBuildersourceColumn - The source columntargetColumn - The target columnIOExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.