org.apache.empire.db.mysql
Class MySQLDDLGenerator

java.lang.Object
  extended by org.apache.empire.db.DBDDLGenerator<DBDatabaseDriverMySQL>
      extended by org.apache.empire.db.mysql.MySQLDDLGenerator

public class MySQLDDLGenerator
extends DBDDLGenerator<DBDatabaseDriverMySQL>


Field Summary
 
Fields inherited from class org.apache.empire.db.DBDDLGenerator
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 Summary
MySQLDDLGenerator(DBDatabaseDriverMySQL driver)
           
 
Method Summary
protected  boolean appendColumnDataType(DataType type, double size, DBTableColumn c, StringBuilder sql)
          appends the data type of a column
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 createTable(DBTable t, DBSQLScript script)
          Appends the DDL-Script for creating the given table to an SQL-Script
 
Methods inherited from class org.apache.empire.db.DBDDLGenerator
addAlterTableStmt, addCreateIndexStmt, addCreateRelationStmt, addCreateTableStmt, addCreateViewStmt, alterTable, appendColumnDesc, appendElementName, createIndex, createRelation, createTableIndexes, createView, detectQuoteName, dropDatabase, dropObject, getDDLScript
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLDDLGenerator

public MySQLDDLGenerator(DBDatabaseDriverMySQL driver)
Method Detail

appendColumnDataType

protected boolean appendColumnDataType(DataType type,
                                       double size,
                                       DBTableColumn c,
                                       StringBuilder sql)
Description copied from class: DBDDLGenerator
appends the data type of a column

Overrides:
appendColumnDataType in class DBDDLGenerator<DBDatabaseDriverMySQL>
Parameters:
type - the type
size - the size
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<DBDatabaseDriverMySQL>
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<DBDatabaseDriverMySQL>
Parameters:
t - the table to create
script - the sql script to which to append the dll command(s)


Copyright © 2008–2014 Apache Software Foundation. All rights reserved.