Class PostgresDDLGenerator

java.lang.Object
org.apache.empire.db.DBDDLGenerator<DBMSHandlerPostgreSQL>
org.apache.empire.dbms.postgresql.PostgresDDLGenerator

public class PostgresDDLGenerator extends DBDDLGenerator<DBMSHandlerPostgreSQL>
  • Constructor Details

  • Method Details

    • isCreateReverseFunction

      public boolean isCreateReverseFunction()
      Returns whether the reverse function should be created with the database
    • setCreateReverseFunction

      public void setCreateReverseFunction(boolean createReverseFunction)
      Set whether to create the reverse function with the database
    • appendColumnDataType

      protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql)
      Description copied from class: DBDDLGenerator
      appends the data type of a column
      Overrides:
      appendColumnDataType in class DBDDLGenerator<DBMSHandlerPostgreSQL>
      Parameters:
      type - the type
      size - the size
      c - the table column
      sql - the builder that we will append to
      Returns:
      true if further column attributes may be added or false otherwise
    • createDatabase

      protected void createDatabase(DBDatabase db, DBSQLScript script)
      Description copied from class: DBDDLGenerator
      Appends the DDL-Script for creating the given database to an SQL-Script
      This includes the generation of all tables, views and relations.
      Overrides:
      createDatabase in class DBDDLGenerator<DBMSHandlerPostgreSQL>
      Parameters:
      db - the database to create
      script - the sql script to which to append the dll command(s)
    • createSequence

      protected void createSequence(DBDatabase db, DBTableColumn column, DBSQLScript script)
      Appends the DDL-Script for creating a sequence to an SQL-Script
      Parameters:
      db - the database to create
      column - the column for which to create the sequence
      script - the sql script to which to append the dll command(s)
    • appendColumnDesc

      protected void appendColumnDesc(DBTableColumn c, boolean alter, DBSQLBuilder sql)
      Description copied from class: DBDDLGenerator
      Appends a table column definition to a ddl statement
      Overrides:
      appendColumnDesc in class DBDDLGenerator<DBMSHandlerPostgreSQL>
      Parameters:
      c - the column which description to append
      alter - true if altering an existing column or false otherwise
      sql - the sql builder object