public class PostgreDDLGenerator extends DBDDLGenerator<DBDatabaseDriverPostgreSQL>
alterColumnPhrase, databaseObjectName, DATATYPE_BLOB, DATATYPE_BOOLEAN, DATATYPE_CHAR, DATATYPE_CLOB, DATATYPE_DATE, DATATYPE_DECIMAL, DATATYPE_FLOAT, DATATYPE_INT_BIG, DATATYPE_INT_SMALL, DATATYPE_INTEGER, DATATYPE_TIMESTAMP, DATATYPE_UNIQUEID, DATATYPE_VARCHAR, driver, namePrimaryKeyConstraint
Constructor and Description |
---|
PostgreDDLGenerator(DBDatabaseDriverPostgreSQL driver) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
appendColumnDataType(DataType type,
double size,
DBTableColumn c,
StringBuilder sql)
appends the data type of a column
|
protected void |
appendColumnDesc(DBTableColumn c,
boolean alter,
StringBuilder 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 c,
DBSQLScript script)
Appends the DDL-Script for creating a sequence to an SQL-Script
|
addAlterTableStmt, addCreateIndexStmt, addCreateRelationStmt, addCreateTableStmt, addCreateViewStmt, alterTable, appendElementName, createIndex, createRelation, createTable, createTableIndexes, createView, detectQuoteName, dropDatabase, dropObject, getDDLScript
public PostgreDDLGenerator(DBDatabaseDriverPostgreSQL driver)
protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, StringBuilder sql)
DBDDLGenerator
appendColumnDataType
in class DBDDLGenerator<DBDatabaseDriverPostgreSQL>
type
- the typesize
- the sizesql
- the builder that we will append toprotected void createDatabase(DBDatabase db, DBSQLScript script)
DBDDLGenerator
createDatabase
in class DBDDLGenerator<DBDatabaseDriverPostgreSQL>
db
- the database to createscript
- the sql script to which to append the dll command(s)protected void createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
db
- the database to createc
- 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, StringBuilder sql)
DBDDLGenerator
appendColumnDesc
in class DBDDLGenerator<DBDatabaseDriverPostgreSQL>
c
- the column which description to appendalter
- true if altering an existing column or false otherwisesql
- the sql builder objectCopyright © 2008–2017 Apache Software Foundation. All rights reserved.