Class AbstractHanaDdl
- java.lang.Object
-
- io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl
-
- io.ebeaninternal.dbmigration.ddlgeneration.platform.AbstractHanaDdl
-
- Direct Known Subclasses:
HanaColumnStoreDdl
,HanaRowStoreDdl
public abstract class AbstractHanaDdl extends PlatformDdl
-
-
Constructor Summary
Constructors Constructor Description AbstractHanaDdl(DatabasePlatform platform)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
alterColumnBaseAttributes(AlterColumn alter)
Alter column setting both the type and not null constraint.String
alterColumnDefaultValue(String tableName, String columnName, String defaultValue)
Alter column setting the default value.String
alterColumnNotnull(String tableName, String columnName, boolean notnull)
Alter a column adding or removing the not null constraint.String
alterColumnType(String tableName, String columnName, String type)
Alter a column type.String
alterTableAddUniqueConstraint(String tableName, String uqName, String[] columns, String[] nullableColumns)
Add a unique constraint to the table.void
alterTableDropColumn(DdlBuffer buffer, String tableName, String columnName)
It is rather complex to delete a column on HANA as there must not exist any foreign keys.String
alterTableDropConstraint(String tableName, String constraintName)
Drop a unique constraint from the table.String
alterTableDropUniqueConstraint(String tableName, String uniqueConstraintName)
Drop a unique constraint from the table (Sometimes this is an index).DdlHandler
createDdlHandler(ServerConfig serverConfig)
Create a DdlHandler for the specific database platform.-
Methods inherited from class io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl
addColumnComment, addHistoryTable, addTableComment, addTablePartition, alterTableAddCheckConstraint, alterTableAddColumn, alterTableAddForeignKey, alterTableDropForeignKey, asIdentityColumn, configure, convert, convertDefaultValue, createCheckConstraint, createIndex, createSequence, createWithHistory, dropHistoryTable, dropIndex, dropIndex, dropSequence, dropTable, generateEpilog, generateProlog, getCreateTableCommandPrefix, getPlatform, getUpdateNullWithDefault, inlineTableComment, isIncludeStorageEngine, isInlineComments, isInlineForeignKeys, isInlineUniqueWhenNullable, lockTables, regenerateHistoryTriggers, setLockTimeout, suppressPrimaryKeyOnPartition, tableInlineForeignKey, tableStorageEngine, unlockTables, useIdentityType, writeTableColumns
-
-
-
-
Constructor Detail
-
AbstractHanaDdl
public AbstractHanaDdl(DatabasePlatform platform)
-
-
Method Detail
-
alterColumnBaseAttributes
public String alterColumnBaseAttributes(AlterColumn alter)
Description copied from class:PlatformDdl
Alter column setting both the type and not null constraint.Used by MySql, SQL Server, and HANA as these require both column attributes to be set together.
- Overrides:
alterColumnBaseAttributes
in classPlatformDdl
-
alterColumnDefaultValue
public String alterColumnDefaultValue(String tableName, String columnName, String defaultValue)
Description copied from class:PlatformDdl
Alter column setting the default value.- Overrides:
alterColumnDefaultValue
in classPlatformDdl
-
alterColumnNotnull
public String alterColumnNotnull(String tableName, String columnName, boolean notnull)
Description copied from class:PlatformDdl
Alter a column adding or removing the not null constraint.Note that that MySql, SQL Server, and HANA instead use alterColumnBaseAttributes()
- Overrides:
alterColumnNotnull
in classPlatformDdl
-
createDdlHandler
public DdlHandler createDdlHandler(ServerConfig serverConfig)
Description copied from class:PlatformDdl
Create a DdlHandler for the specific database platform.- Overrides:
createDdlHandler
in classPlatformDdl
-
alterColumnType
public String alterColumnType(String tableName, String columnName, String type)
Description copied from class:PlatformDdl
Alter a column type.Note that that MySql and SQL Server instead use alterColumnBaseAttributes()
- Overrides:
alterColumnType
in classPlatformDdl
-
alterTableAddUniqueConstraint
public String alterTableAddUniqueConstraint(String tableName, String uqName, String[] columns, String[] nullableColumns)
Description copied from class:PlatformDdl
Add a unique constraint to the table.Overridden by MsSqlServer for specific null handling on unique constraints.
- Overrides:
alterTableAddUniqueConstraint
in classPlatformDdl
-
alterTableDropUniqueConstraint
public String alterTableDropUniqueConstraint(String tableName, String uniqueConstraintName)
Description copied from class:PlatformDdl
Drop a unique constraint from the table (Sometimes this is an index).- Overrides:
alterTableDropUniqueConstraint
in classPlatformDdl
-
alterTableDropConstraint
public String alterTableDropConstraint(String tableName, String constraintName)
Description copied from class:PlatformDdl
Drop a unique constraint from the table.- Overrides:
alterTableDropConstraint
in classPlatformDdl
-
alterTableDropColumn
public void alterTableDropColumn(DdlBuffer buffer, String tableName, String columnName) throws IOException
It is rather complex to delete a column on HANA as there must not exist any foreign keys. That's why we call a user stored procedure here- Overrides:
alterTableDropColumn
in classPlatformDdl
- Throws:
IOException
-
-