Class DdlWrite
- java.lang.Object
-
- io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite
-
-
Constructor Summary
Constructors Constructor Description DdlWrite()
Create without any configuration or current model (no history support).DdlWrite(MConfiguration configuration, ModelContainer currentModel, DdlOptions options)
Create with a configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DdlBuffer
apply()
Return the buffer that APPLY DDL is written to.DdlBuffer
applyDropDependencies()
Return the buffer that executes early to drop dependencies like views etc.DdlBuffer
applyForeignKeys()
Return the buffer that APPLY DDL is written to for foreign keys and their associated indexes.DdlBuffer
applyHistoryTrigger()
Return the buffer that apply history-trigger DDL is written to.DdlBuffer
applyHistoryView()
Return the buffer that apply history-view DDL is written to.DdlBuffer
dropAll()
Return the buffer used for the 'drop all DDL' to drop tables, views and history triggers etc.DdlBuffer
dropAllForeignKeys()
Return the buffer used for the 'drop all DDL' for dropping foreign keys and associated indexes.DdlOptions
getOptions()
Return the DDL options.MTable
getTable(String tableName)
Return the Table information from the current model.boolean
isApplyEmpty()
Return true if the apply buffers are all empty.
-
-
-
Constructor Detail
-
DdlWrite
public DdlWrite()
Create without any configuration or current model (no history support).
-
DdlWrite
public DdlWrite(MConfiguration configuration, ModelContainer currentModel, DdlOptions options)
Create with a configuration.
-
-
Method Detail
-
getOptions
public DdlOptions getOptions()
Return the DDL options.
-
getTable
public MTable getTable(String tableName)
Return the Table information from the current model.This is typically required for the history support (used to determine the list of columns included in the history when creating or recreating the associated trigger/stored procedure).
-
isApplyEmpty
public boolean isApplyEmpty()
Return true if the apply buffers are all empty.
-
applyDropDependencies
public DdlBuffer applyDropDependencies()
Return the buffer that executes early to drop dependencies like views etc.
-
applyForeignKeys
public DdlBuffer applyForeignKeys()
Return the buffer that APPLY DDL is written to for foreign keys and their associated indexes.Statements added to this buffer are executed after all the normal apply statements and typically 'add foreign key' is added to this buffer.
-
applyHistoryView
public DdlBuffer applyHistoryView()
Return the buffer that apply history-view DDL is written to.
-
applyHistoryTrigger
public DdlBuffer applyHistoryTrigger()
Return the buffer that apply history-trigger DDL is written to.
-
dropAllForeignKeys
public DdlBuffer dropAllForeignKeys()
Return the buffer used for the 'drop all DDL' for dropping foreign keys and associated indexes.
-
-