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 Detail

      • tableEngine

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

        private final java.util.List<java.lang.String> tableEngineParams
        Provided table parameters
      • globalTemporary

        private final boolean globalTemporary
    • Method Detail

      • 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 java.lang.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 java.lang.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 java.lang.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 java.lang.String getCreateSQL​(boolean forMeta)