Package org.h2.index

Class RegularQueryExpressionIndex

All Implemented Interfaces:
SpatialIndex, HasSQL

public final class RegularQueryExpressionIndex extends QueryExpressionIndex implements SpatialIndex
A regular query expression index.
  • Constructor Details

    • RegularQueryExpressionIndex

      public RegularQueryExpressionIndex(QueryExpressionTable table, String querySQL, ArrayList<Parameter> originalParameters, SessionLocal session, int[] masks)
      Creates a new instance of a regular query expression index.
      Parameters:
      table - the query expression table
      querySQL - the query SQL
      originalParameters - the original parameters
      session - the session
      masks - the masks
  • Method Details

    • isExpired

      public boolean isExpired()
      Specified by:
      isExpired in class QueryExpressionIndex
    • getCost

      public double getCost(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet)
      Description copied from class: Index
      Estimate the cost to search for rows given the search mask. There is one element per column in the search mask. For possible search masks, see IndexCondition.
      Specified by:
      getCost in class Index
      Parameters:
      session - the session
      masks - per-column comparison bit masks, null means 'always false', see constants in IndexCondition
      filters - all joined table filters
      filter - the current table filter index
      sortOrder - the sort order
      allColumnsSet - the set of all columns
      Returns:
      the estimated cost
    • find

      public Cursor find(SessionLocal session, SearchRow first, SearchRow last, boolean reverse)
      Description copied from class: Index
      Find a row or a list of rows and create a cursor to iterate over the result.
      Specified by:
      find in class Index
      Parameters:
      session - the session
      first - the first row, or null for no limit
      last - the last row, or null for no limit
      reverse - if true, iterate in reverse (descending) order
      Returns:
      the cursor to iterate over the results
    • findByGeometry

      public Cursor findByGeometry(SessionLocal session, SearchRow first, SearchRow last, boolean reverse, SearchRow intersection)
      Description copied from interface: SpatialIndex
      Find a row or a list of rows and create a cursor to iterate over the result.
      Specified by:
      findByGeometry in interface SpatialIndex
      Parameters:
      session - the session
      first - the lower bound
      last - the upper bound
      reverse - if true, iterate in reverse (descending) order
      intersection - the geometry which values should intersect with, or null for anything
      Returns:
      the cursor to iterate over the results