Class SqlServerDdl
java.lang.Object
io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl
io.ebeaninternal.dbmigration.ddlgeneration.platform.SqlServerDdl
MS SQL Server platform specific DDL.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnComment(DdlBuffer apply, String table, String column, String comment) Add column comment as a separate statement.voidaddTableComment(DdlBuffer apply, String tableName, String tableComment) Add table comment as a separate statement (from the create table statement).voidalterColumn(DdlWrite writer, AlterColumn alter) Alter column setting (type, default value and not null constraint).alterTableAddUniqueConstraint(String tableName, String uqName, String[] columns, String[] nullableColumns) MsSqlServer specific null handling on unique constraints.voidalterTableDropColumn(DdlWrite writer, String tableName, String columnName) It is rather complex to delete a column on SqlServer as there must not exist any references (constraints, default values, indices and foreign keys).alterTableDropConstraint(String tableName, String constraintName) Drop a unique constraint from the table.alterTableDropForeignKey(String tableName, String fkName) Return the drop foreign key clause.alterTableDropUniqueConstraint(String tableName, String uniqueConstraintName) Drop a unique constraint from the table (Sometimes this is an index).createSequence(String sequenceName, DdlIdentity identity) Generate and return the create sequence DDL.Return the drop index statement.dropSequence(String sequenceName) Return the drop sequence statement (potentially with if exists clause).Return the drop table statement (potentially with if exists clause).voidgenerateProlog(DdlWrite writer) This writes the multi value datatypes needed for MultiValueBind.static StringifObjectExists(String object, String objectType) Methods inherited from class io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl
addHistoryTable, addTablePartition, addTablespace, alterTableAddCheckConstraint, alterTableAddColumn, alterTableAddColumn, alterTableAddForeignKey, alterTableTablespace, asIdentityColumn, configure, convert, convertDefaultValue, createCheckConstraint, createDdlHandler, createIndex, createWithHistory, dropHistoryTable, dropIndex, generateEpilog, getCreateTableCommandPrefix, getPlatform, getUpdateNullWithDefault, inlineTableComment, isIncludeStorageEngine, isInlineComments, isInlineForeignKeys, isInlineUniqueWhenNullable, regenerateHistoryTriggers, setLockTimeout, suppressPrimaryKeyOnPartition, tableInlineForeignKey, tableStorageEngine, useIdentityType, writeTableColumns
-
Constructor Details
-
SqlServerDdl
-
-
Method Details
-
dropTable
Description copied from class:PlatformDdlReturn the drop table statement (potentially with if exists clause).- Overrides:
dropTablein classPlatformDdl
-
alterTableDropForeignKey
Description copied from class:PlatformDdlReturn the drop foreign key clause.- Overrides:
alterTableDropForeignKeyin classPlatformDdl
-
dropSequence
Description copied from class:PlatformDdlReturn the drop sequence statement (potentially with if exists clause).- Overrides:
dropSequencein classPlatformDdl
-
dropIndex
Description copied from class:PlatformDdlReturn the drop index statement.- Overrides:
dropIndexin classPlatformDdl
-
alterTableAddUniqueConstraint
public String alterTableAddUniqueConstraint(String tableName, String uqName, String[] columns, String[] nullableColumns) MsSqlServer specific null handling on unique constraints.- Overrides:
alterTableAddUniqueConstraintin classPlatformDdl
-
alterTableDropConstraint
Description copied from class:PlatformDdlDrop a unique constraint from the table.- Overrides:
alterTableDropConstraintin classPlatformDdl
-
alterTableDropUniqueConstraint
Drop a unique constraint from the table (Sometimes this is an index).- Overrides:
alterTableDropUniqueConstraintin classPlatformDdl
-
createSequence
Generate and return the create sequence DDL.- Overrides:
createSequencein classPlatformDdl
-
alterColumn
Description copied from class:PlatformDdlAlter column setting (type, default value and not null constraint).Used by MySql, SQL Server, and HANA as these require all column attributes to be set together.
- Overrides:
alterColumnin classPlatformDdl
-
addTableComment
Add table comment as a separate statement (from the create table statement).- Overrides:
addTableCommentin classPlatformDdl
-
addColumnComment
Add column comment as a separate statement.- Overrides:
addColumnCommentin classPlatformDdl
-
alterTableDropColumn
It is rather complex to delete a column on SqlServer as there must not exist any references (constraints, default values, indices and foreign keys). That's why we call a user stored procedure here- Overrides:
alterTableDropColumnin classPlatformDdl
-
generateProlog
This writes the multi value datatypes needed for MultiValueBind.- Overrides:
generatePrologin classPlatformDdl
-
ifObjectExists
-