public class PostgreSqlBuilder extends SqlBuilder
_log, LINE_SEPARATOR, SIZE_PLACEHOLDER| Constructor and Description |
|---|
PostgreSqlBuilder(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 |
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.
|
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.
|
addEscapedCharSequence, areEqual, columnsDiffer, copyData, createForeignKey, createForeignKeys, 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, getNativeDefaultValue, 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 PostgreSqlBuilder(Platform platform)
platform - The plaftform this builder belongs topublic void dropTable(Table table) throws IOException
SqlBuilder.dropTable(Database, Table)
if you want that.dropTable in class SqlBuildertable - The table to dropIOExceptionpublic void dropIndex(Table table, Index index) throws IOException
dropIndex in class SqlBuildertable - The table the index is onindex - The index to dropIOExceptionpublic 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 creationIOExceptionprotected 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 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.