Class CreateTable


public class CreateTable extends CommandWithColumns
This class represents the statement CREATE TABLE
  • Field Details

    • data

      private final CreateTableData data
    • ifNotExists

      private boolean ifNotExists
    • onCommitDrop

      private boolean onCommitDrop
    • onCommitTruncate

      private boolean onCommitTruncate
    • asQuery

      private Query asQuery
    • comment

      private String comment
    • withNoData

      private boolean withNoData
  • Constructor Details

  • Method Details

    • setQuery

      public void setQuery(Query query)
    • setTemporary

      public void setTemporary(boolean temporary)
    • setTableName

      public void setTableName(String tableName)
    • addColumn

      public void addColumn(Column column)
      Description copied from class: CommandWithColumns
      Add a column to this table.
      Specified by:
      addColumn in class CommandWithColumns
      Parameters:
      column - the column to add
    • getColumns

      public ArrayList<Column> getColumns()
    • setIfNotExists

      public void setIfNotExists(boolean ifNotExists)
    • update

      public long update()
      Description copied from class: Prepared
      Execute the statement.
      Overrides:
      update in class Prepared
      Returns:
      the update count
    • generateColumnsFromQuery

      private void generateColumnsFromQuery()
    • setPersistIndexes

      public void setPersistIndexes(boolean persistIndexes)
    • setGlobalTemporary

      public void setGlobalTemporary(boolean globalTemporary)
    • setOnCommitDrop

      public void setOnCommitDrop()
      This temporary table is dropped on commit.
    • setOnCommitTruncate

      public void setOnCommitTruncate()
      This temporary table is truncated on commit.
    • setComment

      public void setComment(String comment)
    • setPersistData

      public void setPersistData(boolean persistData)
    • setWithNoData

      public void setWithNoData(boolean withNoData)
    • setTableEngine

      public void setTableEngine(String tableEngine)
    • setTableEngineParams

      public void setTableEngineParams(ArrayList<String> tableEngineParams)
    • setHidden

      public void setHidden(boolean isHidden)
    • getType

      public int getType()
      Description copied from class: Prepared
      Get the command type as defined in CommandInterface
      Specified by:
      getType in class Prepared
      Returns:
      the statement type