Class H2MVTable

  • All Implemented Interfaces:
    org.h2.util.HasSQL

    public class H2MVTable
    extends org.h2.mvstore.db.MVTable
    A MV table linked with a FileDriver
    Author:
    Erwan Bocher (CNRS, 2020), Sylvain PALOMINOS (Lab-STICC UBS 2020)
    • Field Summary

      • Fields inherited from class org.h2.mvstore.db.MVTable

        EXCLUSIVE_LOCKS, SHARED_LOCKS, WAITING_FOR_LOCK
      • Fields inherited from class org.h2.table.Table

        columns, compareMode, EXCLUSIVE_LOCK, isHidden, READ_LOCK, TYPE_CACHED, TYPE_MEMORY, WRITE_LOCK
      • Fields inherited from class org.h2.engine.DbObject

        AGGREGATE, comment, COMMENT, CONSTANT, CONSTRAINT, database, DOMAIN, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, trace, TRIGGER, USER
      • Fields inherited from interface org.h2.util.HasSQL

        ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS
    • Constructor Summary

      Constructors 
      Constructor Description
      H2MVTable​(org.h2gis.api.FileDriver driver, org.h2.command.ddl.CreateTableData data)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.h2.index.Index addIndex​(org.h2.engine.SessionLocal session, String indexName, int indexId, org.h2.table.IndexColumn[] cols, int uniqueColumnCount, org.h2.index.IndexType indexType, boolean create, String indexComment)  
      void addRow​(org.h2.engine.SessionLocal session, org.h2.result.Row row)  
      static void addRowsToIndex​(org.h2.engine.SessionLocal session, ArrayList<org.h2.result.Row> list, org.h2.index.Index index)  
      boolean canDrop()  
      void checkRename()  
      void checkSupportAlter()  
      void close​(org.h2.engine.SessionLocal session)  
      long getDiskSpaceUsed()  
      ArrayList<org.h2.index.Index> getIndexes()  
      long getMaxDataModificationId()  
      org.h2.result.Row getRow​(org.h2.engine.SessionLocal session, long key)  
      long getRowCount​(org.h2.engine.SessionLocal session)  
      long getRowCountApproximation​(org.h2.engine.SessionLocal session)  
      org.h2.table.Column getRowIdColumn()  
      org.h2.index.Index getScanIndex​(org.h2.engine.SessionLocal session)  
      org.h2.table.TableType getTableType()  
      void init​(org.h2.engine.Session session)
      Create row index
      boolean isDeterministic()  
      boolean isLockedExclusively()  
      boolean lock​(org.h2.engine.SessionLocal session, int lockType)  
      void removeChildrenAndResources​(org.h2.engine.SessionLocal session)  
      void removeRow​(org.h2.engine.SessionLocal session, org.h2.result.Row row)  
      long truncate​(org.h2.engine.SessionLocal session)  
      void unlock​(org.h2.engine.SessionLocal session)  
      • Methods inherited from class org.h2.mvstore.db.MVTable

        canGetRowCount, canTruncate, checkDeadlock, commit, getContainsLargeObject, getMainIndexColumn, getMapName, invalidate, isLockedExclusivelyBy, isRowLockable, lockRow, toString, updateRow
      • Methods inherited from class org.h2.table.TableBase

        getCreateSQL, getCreateSQLForMeta, getDropSQL, getMainIndexColumn, isGlobalTemporary
      • Methods inherited from class org.h2.table.Table

        addConstraint, addDependencies, addDependentMaterializedView, addDependentView, addSequence, addSynonym, addTrigger, canReference, checkWritingAllowed, compareValues, convertInsertRow, convertUpdateRow, createRow, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findColumn, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getBestPlanItem, getCheckForeignKeyConstraints, getChildren, getColumn, getColumn, getColumn, getColumns, getCompareMode, getConstraints, getDependentMaterializedViews, getDependentViews, getIdentityColumn, getIndex, getIndexForColumn, getNullRow, getOnCommitDrop, getOnCommitTruncate, getPrimaryKey, getRowFactory, getScanIndex, getSQLTableType, getTemplateRow, getTemplateSimpleRow, getTriggers, getType, hasSelectTrigger, isHidden, isInsertable, isPersistData, isPersistIndexes, isQueryComparable, isTableExpression, isView, removeColumnExpressionsDependencies, removeConstraint, removeDependentMaterializedView, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setColumns, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, updateRows
      • Methods inherited from class org.h2.schema.SchemaObject

        getSchema, getSQL, getSQL
      • Methods inherited from class org.h2.engine.DbObject

        getComment, getCreateSQLForCopy, getDatabase, getId, getModificationId, getName, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary
      • Methods inherited from interface org.h2.util.HasSQL

        getTraceSQL
    • Constructor Detail

      • H2MVTable

        public H2MVTable​(org.h2gis.api.FileDriver driver,
                         org.h2.command.ddl.CreateTableData data)
    • Method Detail

      • init

        public void init​(org.h2.engine.Session session)
        Create row index
        Parameters:
        session - database session
      • lock

        public boolean lock​(org.h2.engine.SessionLocal session,
                            int lockType)
        Overrides:
        lock in class org.h2.mvstore.db.MVTable
      • close

        public void close​(org.h2.engine.SessionLocal session)
        Overrides:
        close in class org.h2.mvstore.db.MVTable
      • unlock

        public void unlock​(org.h2.engine.SessionLocal session)
        Overrides:
        unlock in class org.h2.mvstore.db.MVTable
      • getRow

        public org.h2.result.Row getRow​(org.h2.engine.SessionLocal session,
                                        long key)
        Overrides:
        getRow in class org.h2.mvstore.db.MVTable
      • addIndex

        public org.h2.index.Index addIndex​(org.h2.engine.SessionLocal session,
                                           String indexName,
                                           int indexId,
                                           org.h2.table.IndexColumn[] cols,
                                           int uniqueColumnCount,
                                           org.h2.index.IndexType indexType,
                                           boolean create,
                                           String indexComment)
        Overrides:
        addIndex in class org.h2.mvstore.db.MVTable
      • removeChildrenAndResources

        public void removeChildrenAndResources​(org.h2.engine.SessionLocal session)
        Overrides:
        removeChildrenAndResources in class org.h2.mvstore.db.MVTable
      • addRowsToIndex

        public static void addRowsToIndex​(org.h2.engine.SessionLocal session,
                                          ArrayList<org.h2.result.Row> list,
                                          org.h2.index.Index index)
      • removeRow

        public void removeRow​(org.h2.engine.SessionLocal session,
                              org.h2.result.Row row)
        Overrides:
        removeRow in class org.h2.mvstore.db.MVTable
      • truncate

        public long truncate​(org.h2.engine.SessionLocal session)
        Overrides:
        truncate in class org.h2.mvstore.db.MVTable
      • addRow

        public void addRow​(org.h2.engine.SessionLocal session,
                           org.h2.result.Row row)
        Overrides:
        addRow in class org.h2.mvstore.db.MVTable
      • checkSupportAlter

        public void checkSupportAlter()
        Overrides:
        checkSupportAlter in class org.h2.mvstore.db.MVTable
      • getTableType

        public org.h2.table.TableType getTableType()
        Overrides:
        getTableType in class org.h2.mvstore.db.MVTable
      • getScanIndex

        public org.h2.index.Index getScanIndex​(org.h2.engine.SessionLocal session)
        Overrides:
        getScanIndex in class org.h2.mvstore.db.MVTable
      • getIndexes

        public ArrayList<org.h2.index.Index> getIndexes()
        Overrides:
        getIndexes in class org.h2.mvstore.db.MVTable
      • isLockedExclusively

        public boolean isLockedExclusively()
        Overrides:
        isLockedExclusively in class org.h2.mvstore.db.MVTable
      • getMaxDataModificationId

        public long getMaxDataModificationId()
        Overrides:
        getMaxDataModificationId in class org.h2.mvstore.db.MVTable
      • isDeterministic

        public boolean isDeterministic()
        Overrides:
        isDeterministic in class org.h2.mvstore.db.MVTable
      • canDrop

        public boolean canDrop()
        Overrides:
        canDrop in class org.h2.mvstore.db.MVTable
      • getRowCount

        public long getRowCount​(org.h2.engine.SessionLocal session)
        Overrides:
        getRowCount in class org.h2.mvstore.db.MVTable
      • getRowCountApproximation

        public long getRowCountApproximation​(org.h2.engine.SessionLocal session)
        Overrides:
        getRowCountApproximation in class org.h2.mvstore.db.MVTable
      • getDiskSpaceUsed

        public long getDiskSpaceUsed()
        Overrides:
        getDiskSpaceUsed in class org.h2.mvstore.db.MVTable
      • checkRename

        public void checkRename()
        Overrides:
        checkRename in class org.h2.engine.DbObject
      • getRowIdColumn

        public org.h2.table.Column getRowIdColumn()
        Overrides:
        getRowIdColumn in class org.h2.mvstore.db.MVTable