public class Oracle8Builder extends SqlBuilder
_log, LINE_SEPARATOR, SIZE_PLACEHOLDER| Constructor and Description |
|---|
Oracle8Builder(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.
|
protected void |
createAutoIncrementSequence(Table table,
Column column)
Creates the sequence necessary for the auto-increment of the given column.
|
protected void |
createAutoIncrementTrigger(Table table,
Column column)
Creates the trigger 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 |
createTemporaryTable(Database database,
Table table,
Map parameters)
Outputs the DDL to create the given temporary table.
|
protected void |
dropAutoIncrementSequence(Table table,
Column column)
Drops the sequence used for the auto-increment of the given column.
|
protected void |
dropAutoIncrementTrigger(Table table,
Column column)
Drops the trigger used for the auto-increment of the given column.
|
void |
dropColumn(Table table,
Column column)
Writes the SQL to drop a column.
|
void |
dropForeignKeys(Table table)
Creates external foreignkey drop statements.
|
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 to drop the primary key of the given table.
|
void |
dropTable(Table table)
Outputs the DDL to drop the table.
|
protected void |
dropTemporaryTable(Database database,
Table table)
Outputs the DDL to drop the given temporary 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 String |
getSqlType(Column column)
Returns the full SQL type specification (including size and precision/scale) for the
given column.
|
protected void |
printDefaultValue(Object defaultValue,
int typeCode)
Prints the default value of the 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, createForeignKeys, createIndex, createIndexes, createPrimaryKey, createTable, createTables, createTables, createTables, createUniqueIdentifier, dropForeignKey, dropTable, dropTables, escapeStringValue, getBareNativeType, getColumnName, getConstraintName, getDefaultValueHelper, getDeleteSql, getDelimitedIdentifier, getForeignKeyName, getIndent, getIndexName, getInsertSql, getMaxColumnNameLength, getMaxConstraintNameLength, getMaxForeignKeyNameLength, getMaxTableNameLength, getNativeType, getPlatform, getPlatformInfo, getSizeSpec, getSqlType, getTableName, getUpdateSql, getUpdateSql, getValueAsString, getValueDateFormat, getValueLocale, getValueNumberFormat, getValueTimeFormat, getWriter, isValidDefaultValue, print, printComment, 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 Oracle8Builder(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 void createAutoIncrementSequence(Table table, Column column) throws IOException
table - The tablecolumn - The columnIOExceptionprotected void createAutoIncrementTrigger(Table table, Column column) throws IOException
table - The tablecolumn - The columnIOExceptionprotected void dropAutoIncrementSequence(Table table, Column column) throws IOException
table - The tablecolumn - The columnIOExceptionprotected void dropAutoIncrementTrigger(Table table, Column column) throws IOException
table - The tablecolumn - The columnIOExceptionprotected void createTemporaryTable(Database database, Table table, Map parameters) throws IOException
SqlBuilder.createTable(Database, Table, Map).createTemporaryTable in class SqlBuilderdatabase - The database modeltable - The tableparameters - Additional platform-specific parameters for the table creationIOExceptionprotected void dropTemporaryTable(Database database, Table table) throws IOException
SqlBuilder.dropTable(Table).dropTemporaryTable in class SqlBuilderdatabase - The database modeltable - The tableIOExceptionpublic void dropForeignKeys(Table table) throws IOException
dropForeignKeys in class SqlBuildertable - 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 printDefaultValue(Object defaultValue, int typeCode) throws IOException
printDefaultValue in class SqlBuilderdefaultValue - The default valuetypeCode - The type code to write the default value forIOExceptionprotected 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 addColumn(Database model, Table table, Column newColumn) throws IOException
addColumn in class SqlBuildermodel - The database modeltable - The tablenewColumn - The new columnIOExceptionpublic void dropColumn(Table table, Column column) throws IOException
table - The tablecolumn - The column to dropIOExceptionpublic void dropPrimaryKey(Table table) throws IOException
table - The tableIOExceptionprotected void writeCastExpression(Column sourceColumn, Column targetColumn) throws IOException
writeCastExpression in class SqlBuildersourceColumn - The source columntargetColumn - The target columnIOExceptionprotected String getSqlType(Column column)
getSqlType in class SqlBuildercolumn - The columnCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.