Package org.apache.empire.dbms.sqlserver
Class MSSqlDDLGenerator
java.lang.Object
org.apache.empire.db.DBDDLGenerator<DBMSHandlerMSSQL>
org.apache.empire.dbms.sqlserver.MSSqlDDLGenerator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.empire.db.DBDDLGenerator
DBDDLGenerator.DDLActionType -
Field Summary
Fields 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, log, namePrimaryKeyConstraint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCreateIndexStmt(DBIndex index, DBSQLBuilder sql, DBSQLScript script) protected voidaddCreateViewStmt(DBView v, DBSQLBuilder sql, DBSQLScript script) protected booleanappendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql) appends the data type of a columnprotected voidappendIndexType(DBIndex index, DBSQLBuilder sql) Appends the index type when creating an indexprotected 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.voidgetDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script) Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.protected voidsets Oracle specific data typesMethods inherited from class org.apache.empire.db.DBDDLGenerator
addAlterTableStmt, addCreateRelationStmt, addCreateTableStmt, alterTable, appendColumnDesc, appendElementName, appendIndexColumn, createIndex, createRelation, createTable, createTableIndexes, createView, dropDatabase, dropObject, isDDLColumnDefaults, setDDLColumnDefaults
-
Constructor Details
-
MSSqlDDLGenerator
-
-
Method Details
-
initDataTypes
sets Oracle specific data types- Parameters:
dbms-
-
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<DBMSHandlerMSSQL>- 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<DBMSHandlerMSSQL>- Parameters:
db- the database to createscript- the sql script to which to append the dll command(s)
-
appendIndexType
Description copied from class:DBDDLGeneratorAppends the index type when creating an index- Overrides:
appendIndexTypein classDBDDLGenerator<DBMSHandlerMSSQL>- Parameters:
index- the indexsql- the sql builder object
-
addCreateIndexStmt
- Overrides:
addCreateIndexStmtin classDBDDLGenerator<DBMSHandlerMSSQL>
-
addCreateViewStmt
- Overrides:
addCreateViewStmtin classDBDDLGenerator<DBMSHandlerMSSQL>
-
getDDLScript
Description copied from class:DBDDLGeneratorAppends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.- Overrides:
getDDLScriptin classDBDDLGenerator<DBMSHandlerMSSQL>- Parameters:
type- operation to perform (CREATE, DROP, ALTER)dbo- the object for which to perform the operation (DBDatabase, DBTable, DBView, DBColumn, DBRelation)script- the script to which to add the DDL command(s)
-