|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ddlutils.platform.SqlBuilder
org.apache.ddlutils.platform.postgresql.PostgreSqlBuilder
The SQL Builder for PostgresSql.
Field Summary |
Fields inherited from class org.apache.ddlutils.platform.SqlBuilder |
_log, SIZE_PLACEHOLDER |
Constructor Summary | |
PostgreSqlBuilder(PlatformInfo info)
Creates a new builder instance. |
Method Summary | |
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 |
dropTable(Table table)
Outputs the DDL to drop the table. |
String |
getSelectLastInsertId(Table table)
Generates the SQL for querying the id that was created in the last insertion operation. This is obviously only useful for pk fields that are auto-incrementing. A database that does not support this, will return null . |
protected void |
writeColumnAutoIncrementStmt(Table table,
Column column)
Prints that the column is an auto increment column. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PostgreSqlBuilder(PlatformInfo info)
info
- The platform infoMethod Detail |
public void dropTable(Table table) throws IOException
dropTable
in class SqlBuilder
table
- The table to drop
IOException
public void createTable(Database database, Table table, Map parameters) throws IOException
createTable
in class SqlBuilder
database
- The database modeltable
- The tableparameters
- Additional platform-specific parameters for the table creation
IOException
protected void writeColumnAutoIncrementStmt(Table table, Column column) throws IOException
writeColumnAutoIncrementStmt
in class SqlBuilder
table
- The tablecolumn
- The column
IOException
public String getSelectLastInsertId(Table table)
null
.
getSelectLastInsertId
in class SqlBuilder
table
- The table
null
if the database does not support this
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |