public class PostgresDDLGenerator extends DBDDLGenerator<DBMSHandlerPostgreSQL>
DBDDLGenerator.DDLActionTypealterColumnPhrase, databaseObjectName, DATATYPE_BLOB, DATATYPE_BOOLEAN, DATATYPE_CHAR, DATATYPE_CLOB, DATATYPE_DATE, DATATYPE_DECIMAL, DATATYPE_FLOAT, DATATYPE_INT_BIG, DATATYPE_INT_SMALL, DATATYPE_INTEGER, DATATYPE_TIME, DATATYPE_TIMESTAMP, DATATYPE_UNIQUEID, DATATYPE_VARCHAR, dbms, ddlColumnDefaults, namePrimaryKeyConstraint| Constructor and Description |
|---|
PostgresDDLGenerator(DBMSHandlerPostgreSQL dbms) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql)
appends the data type of a column
|
protected void |
appendColumnDesc(DBTableColumn c,
boolean alter,
DBSQLBuilder sql)
Appends a table column definition to a ddl statement
|
protected void |
createDatabase(DBDatabase db,
DBSQLScript script)
Appends the DDL-Script for creating the given database to an SQL-Script
This includes the generation of all tables, views and relations. |
protected void |
createSequence(DBDatabase db,
DBTableColumn column,
DBSQLScript script)
Appends the DDL-Script for creating a sequence to an SQL-Script
|
boolean |
isCreateReverseFunction()
Returns whether the reverse function should be created with the database
|
void |
setCreateReverseFunction(boolean createReverseFunction)
Set whether to create the reverse function with the database
|
addAlterTableStmt, addCreateIndexStmt, addCreateRelationStmt, addCreateTableStmt, addCreateViewStmt, alterTable, appendElementName, createIndex, createRelation, createTable, createTableIndexes, createView, dropDatabase, dropObject, getDDLScript, isDDLColumnDefaults, setDDLColumnDefaultspublic PostgresDDLGenerator(DBMSHandlerPostgreSQL dbms)
public boolean isCreateReverseFunction()
public void setCreateReverseFunction(boolean createReverseFunction)
protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql)
DBDDLGeneratorappendColumnDataType in class DBDDLGenerator<DBMSHandlerPostgreSQL>type - the typesize - the sizec - the table columnsql - the builder that we will append toprotected void createDatabase(DBDatabase db, DBSQLScript script)
DBDDLGeneratorcreateDatabase in class DBDDLGenerator<DBMSHandlerPostgreSQL>db - the database to createscript - the sql script to which to append the dll command(s)protected void createSequence(DBDatabase db, DBTableColumn column, DBSQLScript script)
db - the database to createcolumn - the column for which to create the sequencescript - the sql script to which to append the dll command(s)protected void appendColumnDesc(DBTableColumn c, boolean alter, DBSQLBuilder sql)
DBDDLGeneratorappendColumnDesc in class DBDDLGenerator<DBMSHandlerPostgreSQL>c - the column which description to appendalter - true if altering an existing column or false otherwisesql - the sql builder objectCopyright © 2008–2023 Apache Software Foundation. All rights reserved.