Package org.h2.index

Class VirtualTableIndex

All Implemented Interfaces:
HasSQL
Direct Known Subclasses:
DualIndex, RangeIndex, VirtualConstructedTableIndex

public abstract class VirtualTableIndex extends Index
An base class for indexes of virtual tables.
  • Constructor Details

  • Method Details

    • close

      public void close(SessionLocal session)
      Description copied from class: Index
      Close this index.
      Specified by:
      close in class Index
      Parameters:
      session - the session used to write data
    • add

      public void add(SessionLocal session, Row row)
      Description copied from class: Index
      Add a row to the index.
      Specified by:
      add in class Index
      Parameters:
      session - the session to use
      row - the row to add
    • remove

      public void remove(SessionLocal session, Row row)
      Description copied from class: Index
      Remove a row from the index.
      Specified by:
      remove in class Index
      Parameters:
      session - the session
      row - the row
    • remove

      public void remove(SessionLocal session)
      Description copied from class: Index
      Remove the index.
      Specified by:
      remove in class Index
      Parameters:
      session - the session
    • truncate

      public void truncate(SessionLocal session)
      Description copied from class: Index
      Remove all rows from the index.
      Specified by:
      truncate in class Index
      Parameters:
      session - the session
    • needRebuild

      public boolean needRebuild()
      Description copied from class: Index
      Check if the index needs to be rebuilt. This method is called after opening an index.
      Specified by:
      needRebuild in class Index
      Returns:
      true if a rebuild is required.
    • checkRename

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

      public long getRowCount(SessionLocal session)
      Description copied from class: Index
      Get the row count of this table, for the given session.
      Specified by:
      getRowCount in class Index
      Parameters:
      session - the session
      Returns:
      the row count
    • getRowCountApproximation

      public long getRowCountApproximation(SessionLocal session)
      Description copied from class: Index
      Get the approximated row count for this table.
      Specified by:
      getRowCountApproximation in class Index
      Parameters:
      session - the session
      Returns:
      the approximated row count