Class MySQLDDLGenerator

java.lang.Object
org.apache.empire.db.DBDDLGenerator<DBMSHandlerMySQL>
org.apache.empire.dbms.mysql.MySQLDDLGenerator

public class MySQLDDLGenerator extends DBDDLGenerator<DBMSHandlerMySQL>
  • Field Details

    • DATATYPE_INT_TINY

      protected String DATATYPE_INT_TINY
    • DATATYPE_INT_MEDIUM

      protected String DATATYPE_INT_MEDIUM
  • Constructor Details

  • Method Details

    • 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<DBMSHandlerMySQL>
      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<DBMSHandlerMySQL>
      Parameters:
      db - the database to create
      script - the sql script to which to append the dll command(s)
    • createTable

      protected void createTable(DBTable t, DBSQLScript script)
      Appends the DDL-Script for creating the given table to an SQL-Script
      Overrides:
      createTable in class DBDDLGenerator<DBMSHandlerMySQL>
      Parameters:
      t - the table to create
      script - the sql script to which to append the dll command(s)
    • createView

      protected void createView(DBView v, DBSQLScript script)
      Appends the DDL-Script for creating the given view to an SQL-Script
      Overrides:
      createView in class DBDDLGenerator<DBMSHandlerMySQL>
      Parameters:
      v - the view to create
      script - the sql script to which to append the dll command(s)