Class ClickHouseDdl
- java.lang.Object
-
- io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl
-
- io.ebeaninternal.dbmigration.ddlgeneration.platform.ClickHouseDdl
-
public class ClickHouseDdl extends PlatformDdl
-
-
Constructor Summary
Constructors Constructor Description ClickHouseDdl(DatabasePlatform platform)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumnComment(DdlBuffer apply, String table, String column, String comment)
Add column comment as a separate statement.void
addTableComment(DdlBuffer apply, String tableName, String tableComment)
Add table comment as a separate statement (from the create table statement).String
alterTableAddForeignKey(DdlOptions options, io.ebeaninternal.dbmigration.ddlgeneration.platform.WriteForeignKey request)
Add foreign key.String
alterTableDropForeignKey(String tableName, String fkName)
Return the drop foreign key clause.String
createCheckConstraint(String ckName, String checkConstraint)
Returns the check constraint.DdlHandler
createDdlHandler(ServerConfig serverConfig)
Create a DdlHandler for the specific database platform.String
createIndex(io.ebeaninternal.dbmigration.ddlgeneration.platform.WriteCreateIndex create)
String
dropIndex(String indexName, String tableName, boolean concurrent)
Return the drop index statement.boolean
isInlineComments()
Return true if the table and column comments are included inline.String
tableInlineForeignKey(io.ebeaninternal.dbmigration.ddlgeneration.platform.WriteForeignKey request)
Return the foreign key constraint when used inline with create table.void
tableStorageEngine(DdlBuffer apply, String storageEngine)
Add an table storage engine to the create table statement.-
Methods inherited from class io.ebeaninternal.dbmigration.ddlgeneration.platform.PlatformDdl
addHistoryTable, addTablePartition, alterColumnBaseAttributes, alterColumnDefaultValue, alterColumnNotnull, alterColumnType, alterTableAddCheckConstraint, alterTableAddColumn, alterTableAddUniqueConstraint, alterTableDropColumn, alterTableDropConstraint, alterTableDropUniqueConstraint, asIdentityColumn, configure, convert, convertDefaultValue, createSequence, createWithHistory, dropHistoryTable, dropIndex, dropSequence, dropTable, generateEpilog, generateProlog, getCreateTableCommandPrefix, getPlatform, getUpdateNullWithDefault, inlineTableComment, isIncludeStorageEngine, isInlineForeignKeys, isInlineUniqueWhenNullable, lockTables, regenerateHistoryTriggers, setLockTimeout, suppressPrimaryKeyOnPartition, unlockTables, useIdentityType, writeTableColumns
-
-
-
-
Constructor Detail
-
ClickHouseDdl
public ClickHouseDdl(DatabasePlatform platform)
-
-
Method Detail
-
createDdlHandler
public DdlHandler createDdlHandler(ServerConfig serverConfig)
Description copied from class:PlatformDdl
Create a DdlHandler for the specific database platform.- Overrides:
createDdlHandler
in classPlatformDdl
-
tableStorageEngine
public void tableStorageEngine(DdlBuffer apply, String storageEngine) throws IOException
Add an table storage engine to the create table statement.- Overrides:
tableStorageEngine
in classPlatformDdl
- Throws:
IOException
-
alterTableAddForeignKey
public String alterTableAddForeignKey(DdlOptions options, io.ebeaninternal.dbmigration.ddlgeneration.platform.WriteForeignKey request)
Description copied from class:PlatformDdl
Add foreign key.- Overrides:
alterTableAddForeignKey
in classPlatformDdl
-
alterTableDropForeignKey
public String alterTableDropForeignKey(String tableName, String fkName)
Description copied from class:PlatformDdl
Return the drop foreign key clause.- Overrides:
alterTableDropForeignKey
in classPlatformDdl
-
tableInlineForeignKey
public String tableInlineForeignKey(io.ebeaninternal.dbmigration.ddlgeneration.platform.WriteForeignKey request)
Description copied from class:PlatformDdl
Return the foreign key constraint when used inline with create table.- Overrides:
tableInlineForeignKey
in classPlatformDdl
-
dropIndex
public String dropIndex(String indexName, String tableName, boolean concurrent)
Description copied from class:PlatformDdl
Return the drop index statement.- Overrides:
dropIndex
in classPlatformDdl
-
createIndex
public String createIndex(io.ebeaninternal.dbmigration.ddlgeneration.platform.WriteCreateIndex create)
- Overrides:
createIndex
in classPlatformDdl
-
createCheckConstraint
public String createCheckConstraint(String ckName, String checkConstraint)
Description copied from class:PlatformDdl
Returns the check constraint.- Overrides:
createCheckConstraint
in classPlatformDdl
-
addTableComment
public void addTableComment(DdlBuffer apply, String tableName, String tableComment)
Description copied from class:PlatformDdl
Add table comment as a separate statement (from the create table statement).- Overrides:
addTableComment
in classPlatformDdl
-
addColumnComment
public void addColumnComment(DdlBuffer apply, String table, String column, String comment)
Description copied from class:PlatformDdl
Add column comment as a separate statement.- Overrides:
addColumnComment
in classPlatformDdl
-
isInlineComments
public boolean isInlineComments()
Description copied from class:PlatformDdl
Return true if the table and column comments are included inline.- Overrides:
isInlineComments
in classPlatformDdl
-
-