Class DdlWrite


  • public class DdlWrite
    extends Object
    Write context holding the buffers for both apply and rollback DDL.
    • Method Detail

      • 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.
      • apply

        public DdlBuffer apply()
        Return the buffer that APPLY DDL is written to.
      • 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.

      • dropAllForeignKeys

        public DdlBuffer dropAllForeignKeys()
        Return the buffer used for the 'drop all DDL' for dropping foreign keys and associated indexes.
      • dropAll

        public DdlBuffer dropAll()
        Return the buffer used for the 'drop all DDL' to drop tables, views and history triggers etc.