Package org.h2.table

Class TableBase

All Implemented Interfaces:
HasSQL
Direct Known Subclasses:
MVTable

public abstract class TableBase extends Table
The base class of a regular table, or a user defined table.
  • Field Details

    • tableEngine

      private final String tableEngine
      The table engine used (null for regular tables).
    • tableEngineParams

      private final List<String> tableEngineParams
      Provided table parameters
    • globalTemporary

      private final boolean globalTemporary
  • Constructor Details

  • Method Details

    • getMainIndexColumn

      public static int getMainIndexColumn(IndexType indexType, IndexColumn[] cols)
      Returns main index column if index is an primary key index and has only one column with _ROWID_ compatible data type.
      Parameters:
      indexType - type of an index
      cols - columns of the index
      Returns:
      main index column or SearchRow.ROWID_INDEX
    • getDropSQL

      public String getDropSQL()
      Description copied from class: DbObject
      Construct a DROP ... SQL statement for this object.
      Overrides:
      getDropSQL in class DbObject
      Returns:
      the SQL statement
    • getCreateSQLForMeta

      public String getCreateSQLForMeta()
      Description copied from class: DbObject
      Construct the CREATE ... SQL statement for this object for meta table.
      Overrides:
      getCreateSQLForMeta in class DbObject
      Returns:
      the SQL statement
    • getCreateSQL

      public String getCreateSQL()
      Description copied from class: DbObject
      Construct the CREATE ... SQL statement for this object.
      Specified by:
      getCreateSQL in class DbObject
      Returns:
      the SQL statement
    • getCreateSQL

      private String getCreateSQL(boolean forMeta)
    • isGlobalTemporary

      public boolean isGlobalTemporary()
      Overrides:
      isGlobalTemporary in class Table