public class MSSqlDDLGenerator extends DBDDLGenerator<DBMSHandlerMSSQL>
DBDDLGenerator.DDLActionTypealterColumnPhrase, 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 and Description |
|---|
MSSqlDDLGenerator(DBMSHandlerMSSQL dbms) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCreateIndexStmt(DBIndex index,
DBSQLBuilder sql,
DBSQLScript script) |
protected void |
addCreateViewStmt(DBView v,
DBSQLBuilder sql,
DBSQLScript script) |
protected boolean |
appendColumnDataType(DataType type,
double size,
DBTableColumn c,
DBSQLBuilder sql)
appends the data type of a column
|
protected void |
appendIndexType(DBIndex index,
DBSQLBuilder sql)
Appends the index type when creating an index
|
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. |
void |
getDDLScript(DBDDLGenerator.DDLActionType type,
DBObject dbo,
DBSQLScript script)
Appends the required DLL commands to create, drop or alter an object to the supplied DBDQLScript.
|
protected void |
initDataTypes(DBMSHandlerMSSQL dbms)
sets Oracle specific data types
|
addAlterTableStmt, addCreateRelationStmt, addCreateTableStmt, alterTable, appendColumnDesc, appendElementName, appendIndexColumn, createIndex, createRelation, createTable, createTableIndexes, createView, dropDatabase, dropObject, isDDLColumnDefaults, setDDLColumnDefaultspublic MSSqlDDLGenerator(DBMSHandlerMSSQL dbms)
protected void initDataTypes(DBMSHandlerMSSQL dbms)
dbms - protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, DBSQLBuilder sql)
DBDDLGeneratorappendColumnDataType in class DBDDLGenerator<DBMSHandlerMSSQL>type - the typesize - the sizec - the table columnsql - the builder that we will append toprotected void createDatabase(DBDatabase db, DBSQLScript script)
DBDDLGeneratorcreateDatabase in class DBDDLGenerator<DBMSHandlerMSSQL>db - the database to createscript - the sql script to which to append the dll command(s)protected void appendIndexType(DBIndex index, DBSQLBuilder sql)
DBDDLGeneratorappendIndexType in class DBDDLGenerator<DBMSHandlerMSSQL>index - the indexsql - the sql builder objectprotected void addCreateIndexStmt(DBIndex index, DBSQLBuilder sql, DBSQLScript script)
addCreateIndexStmt in class DBDDLGenerator<DBMSHandlerMSSQL>protected void addCreateViewStmt(DBView v, DBSQLBuilder sql, DBSQLScript script)
addCreateViewStmt in class DBDDLGenerator<DBMSHandlerMSSQL>public void getDDLScript(DBDDLGenerator.DDLActionType type, DBObject dbo, DBSQLScript script)
DBDDLGeneratorgetDDLScript in class DBDDLGenerator<DBMSHandlerMSSQL>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)Copyright © 2008–2023 Apache Software Foundation. All rights reserved.