Interface DdlAlterTable

All Known Implementing Classes:
BaseAlterTableWrite

public interface DdlAlterTable
Object that represents an Alter Table statements. Table alters are grouped together by tableName in DDL and can be extended by a ddl-specific handler (e.g. doing a reorg for DB2 or implement special grouping for Hana). There is one instance per table.
Author:
TODO Roland Praml, FOCONIS AG
  • Method Summary

    Modifier and Type
    Method
    Description
    append(String operation, String columnName)
    Adds an alter table command for given column.
    boolean
    Flag that detects if history DDL (switching on) is handled for this table.
    raw(String string)
    Adds a raw command.
    void
    Sets the history handled flag for this table.
    void
    write(Appendable target)
    Writes the alter table statements to target
  • Method Details

    • write

      void write(Appendable target) throws IOException
      Writes the alter table statements to target
      Throws:
      IOException
    • append

      DdlBuffer append(String operation, String columnName)
      Adds an alter table command for given column. When you invoke
      alterTable(writer, "my_table").add("alter column","my_column).append("type integer") the resulting DDL (in standard implementation) would be
      alter table my_table alter column my_column type integer
      Returns:
      a DdlBuffer, which can be used for further appends. Note you MUST NOT call .endOfStatement() on this buffer.
    • raw

      DdlBuffer raw(String string)
      Adds a raw command. This is mainly used for executing user stored procedures.
    • isHistoryHandled

      boolean isHistoryHandled()
      Flag that detects if history DDL (switching on) is handled for this table.
    • setHistoryHandled

      Sets the history handled flag for this table.