public class FirebirdBuilder extends SqlBuilder
_log, LINE_SEPARATOR, SIZE_PLACEHOLDER| Constructor and Description |
|---|
FirebirdBuilder(Platform platform)
Creates a new builder instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Database model,
Table table,
Column newColumn)
Prints the SQL for adding a column to a table.
|
void |
createForeignKeys(Database database)
Creates the external foreignkey creation statements for all tables in the database.
|
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).
|
void |
dropColumn(Table table,
Column column)
Writes the SQL to drop a column.
|
void |
dropIndex(Table table,
Index index)
Generates the statement to drop a non-embedded index from the database.
|
void |
dropTable(Table table)
Outputs the DDL to drop the table.
|
protected String |
getGeneratorName(Table table,
Column column)
Determines the name of the generator for an auto-increment column.
|
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.
|
void |
insertColumn(Database model,
Table table,
Column newColumn,
Column prevColumn)
Writes the SQL to add/insert a column.
|
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.
|
addEscapedCharSequence, areEqual, columnsDiffer, copyData, createForeignKey, createForeignKeys, createIndex, createIndexes, createPrimaryKey, createTable, createTables, createTables, createTables, createTemporaryTable, createUniqueIdentifier, dropForeignKey, dropForeignKeys, 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 FirebirdBuilder(Platform platform)
platform - The plaftform this builder belongs topublic void createTable(Database database, Table table, Map parameters) throws IOException
createTable in class SqlBuilderdatabase - The database modeltable - The tableparameters - Additional platform-specific parameters for the table creationIOExceptionpublic void dropTable(Table table) throws IOException
SqlBuilder.dropTable(Database, Table)
if you want that.dropTable in class SqlBuildertable - The table to dropIOExceptionprotected String getGeneratorName(Table table, Column column)
table - The tablecolumn - The auto-increment 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 thisprotected String getNativeDefaultValue(Column column)
getNativeDefaultValue in class SqlBuildercolumn - The columnpublic void createForeignKeys(Database database) throws IOException
createForeignKeys in class SqlBuilderdatabase - The databaseIOExceptionpublic void dropIndex(Table table, Index index) throws IOException
dropIndex in class SqlBuildertable - The table the index is onindex - The index to dropIOExceptionpublic void addColumn(Database model, Table table, Column newColumn) throws IOException
addColumn in class SqlBuildermodel - The database modeltable - The tablenewColumn - The new columnIOExceptionpublic void insertColumn(Database model, Table table, Column newColumn, Column prevColumn) throws IOException
model - The database modeltable - The tablenewColumn - The new columnprevColumn - The column after which the new column shall be added; null
if the new column is to be inserted at the beginningIOExceptionpublic void dropColumn(Table table, Column column) throws IOException
table - The tablecolumn - The column 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.