Class DdlWrite
java.lang.Object
io.ebeaninternal.dbmigration.ddlgeneration.DdlWrite
Write context holding the buffers for both apply and rollback DDL.
-
Constructor Summary
ConstructorsConstructorDescriptionDdlWrite()Create without any configuration or current model (no history support).DdlWrite(MConfiguration configuration, ModelContainer currentModel, DdlOptions options)Create with a configuration. -
Method Summary
Modifier and TypeMethodDescriptionapply()Return the buffer that APPLY DDL is written to.Return the buffer that executes early to drop dependencies like views etc.Return the buffer that APPLY DDL is written to for foreign keys and their associated indexes.Return the buffer that apply history-trigger DDL is written to.Return the buffer that apply history-view DDL is written to.dropAll()Return the buffer used for the 'drop all DDL' to drop tables, views and history triggers etc.Return the buffer used for the 'drop all DDL' for dropping foreign keys and associated indexes.Return the DDL options.Return the Table information from the current model.booleanReturn true if the apply buffers are all empty.
-
Constructor Details
-
DdlWrite
public DdlWrite()Create without any configuration or current model (no history support). -
DdlWrite
Create with a configuration.
-
-
Method Details
-
getOptions
Return the DDL options. -
getTable
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
Return true if the apply buffers are all empty. -
apply
Return the buffer that APPLY DDL is written to. -
applyDropDependencies
Return the buffer that executes early to drop dependencies like views etc. -
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
Return the buffer that apply history-view DDL is written to. -
applyHistoryTrigger
Return the buffer that apply history-trigger DDL is written to. -
dropAllForeignKeys
Return the buffer used for the 'drop all DDL' for dropping foreign keys and associated indexes. -
dropAll
Return the buffer used for the 'drop all DDL' to drop tables, views and history triggers etc.
-