Package org.h2.table

Class VirtualTable

    • Constructor Detail

      • VirtualTable

        protected VirtualTable​(Schema schema,
                               int id,
                               java.lang.String name)
    • Method Detail

      • close

        public void close​(SessionLocal session)
        Description copied from class: Table
        Close the table object and flush changes.
        Specified by:
        close in class Table
        Parameters:
        session - the session
      • addIndex

        public Index addIndex​(SessionLocal session,
                              java.lang.String indexName,
                              int indexId,
                              IndexColumn[] cols,
                              int uniqueColumnCount,
                              IndexType indexType,
                              boolean create,
                              java.lang.String indexComment)
        Description copied from class: Table
        Create an index for this table
        Specified by:
        addIndex in class Table
        Parameters:
        session - the session
        indexName - the name of the index
        indexId - the id
        cols - the index columns
        uniqueColumnCount - the count of unique columns
        indexType - the index type
        create - whether this is a new index
        indexComment - the comment
        Returns:
        the index
      • isInsertable

        public boolean isInsertable()
        Description copied from class: Table
        Returns whether this table is insertable.
        Overrides:
        isInsertable in class Table
        Returns:
        whether this table is insertable
      • removeRow

        public void removeRow​(SessionLocal session,
                              Row row)
        Description copied from class: Table
        Remove a row from the table and all indexes.
        Specified by:
        removeRow in class Table
        Parameters:
        session - the session
        row - the row
      • truncate

        public long truncate​(SessionLocal session)
        Description copied from class: Table
        Remove all rows from the table and indexes.
        Specified by:
        truncate in class Table
        Parameters:
        session - the session
        Returns:
        number of removed rows, possibly including uncommitted rows
      • addRow

        public void addRow​(SessionLocal session,
                           Row row)
        Description copied from class: Table
        Add a row to the table and all indexes.
        Specified by:
        addRow in class Table
        Parameters:
        session - the session
        row - the row
      • checkSupportAlter

        public void checkSupportAlter()
        Description copied from class: Table
        Check if this table supports ALTER TABLE.
        Specified by:
        checkSupportAlter in class Table
      • getTableType

        public TableType getTableType()
        Description copied from class: Table
        Get the table type name
        Specified by:
        getTableType in class Table
        Returns:
        the table type name
      • getIndexes

        public java.util.ArrayList<Index> getIndexes()
        Description copied from class: Table
        Get all indexes for this table.
        Specified by:
        getIndexes in class Table
        Returns:
        the list of indexes
      • canReference

        public boolean canReference()
        Description copied from class: Table
        Check if this table can be referenced.
        Overrides:
        canReference in class Table
        Returns:
        true if it can
      • canDrop

        public boolean canDrop()
        Description copied from class: Table
        Check if this table can be dropped.
        Specified by:
        canDrop in class Table
        Returns:
        true if it can
      • 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
      • checkRename

        public void checkRename()
        Description copied from class: DbObject
        Check if renaming is allowed. Does nothing when allowed.
        Overrides:
        checkRename in class DbObject