Package org.apache.empire.dbms.mysql
Class MySQLDDLGenerator
java.lang.Object
org.apache.empire.db.DBDDLGenerator<DBMSHandlerMySQL>
org.apache.empire.dbms.mysql.MySQLDDLGenerator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.empire.db.DBDDLGenerator
DBDDLGenerator.DDLActionType -
Field Summary
FieldsFields inherited from class org.apache.empire.db.DBDDLGenerator
alterColumnPhrase, databaseObjectName, DATATYPE_BLOB, DATATYPE_BOOLEAN, DATATYPE_CHAR, DATATYPE_CLOB, DATATYPE_DATE, DATATYPE_DATETIME, DATATYPE_DECIMAL, DATATYPE_FLOAT, DATATYPE_INT_BIG, DATATYPE_INT_SMALL, DATATYPE_INTEGER, DATATYPE_TIME, DATATYPE_TIMESTAMP, DATATYPE_UNIQUEID, DATATYPE_VARCHAR, dbms, ddlColumnDefaults, namePrimaryKeyConstraint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanappendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql) appends the data type of a columnprotected voidcreateDatabase(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 voidcreateTable(DBTable t, DBSQLScript script) Appends the DDL-Script for creating the given table to an SQL-Scriptprotected voidcreateView(DBView v, DBSQLScript script) Appends the DDL-Script for creating the given view to an SQL-ScriptMethods inherited from class org.apache.empire.db.DBDDLGenerator
addAlterTableStmt, addCreateIndexStmt, addCreateRelationStmt, addCreateTableStmt, addCreateViewStmt, alterTable, appendColumnDesc, appendElementName, appendIndexColumn, appendIndexType, createIndex, createRelation, createTableIndexes, dropDatabase, dropObject, getDDLScript, isDDLColumnDefaults, setDDLColumnDefaults
-
Field Details
-
DATATYPE_INT_TINY
-
DATATYPE_INT_MEDIUM
-
-
Constructor Details
-
MySQLDDLGenerator
-
-
Method Details
-
appendColumnDataType
protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql) Description copied from class:DBDDLGeneratorappends the data type of a column- Overrides:
appendColumnDataTypein classDBDDLGenerator<DBMSHandlerMySQL>- Parameters:
type- the typesize- the sizec- the table columnsql- the builder that we will append to- Returns:
- true if further column attributes may be added or false otherwise
-
createDatabase
Description copied from class:DBDDLGeneratorAppends the DDL-Script for creating the given database to an SQL-Script
This includes the generation of all tables, views and relations.- Overrides:
createDatabasein classDBDDLGenerator<DBMSHandlerMySQL>- Parameters:
db- the database to createscript- the sql script to which to append the dll command(s)
-
createTable
Appends the DDL-Script for creating the given table to an SQL-Script- Overrides:
createTablein classDBDDLGenerator<DBMSHandlerMySQL>- Parameters:
t- the table to createscript- the sql script to which to append the dll command(s)
-
createView
Appends the DDL-Script for creating the given view to an SQL-Script- Overrides:
createViewin classDBDDLGenerator<DBMSHandlerMySQL>- Parameters:
v- the view to createscript- the sql script to which to append the dll command(s)
-