Interface Restriction

All Known Subinterfaces:
Restrictions, SingleRestriction
All Known Implementing Classes:
MultiColumnRestriction, MultiColumnRestriction.EQRestriction, MultiColumnRestriction.INRestriction, MultiColumnRestriction.InRestrictionWithMarker, MultiColumnRestriction.InRestrictionWithValues, MultiColumnRestriction.NotNullRestriction, MultiColumnRestriction.SliceRestriction, SingleColumnRestriction, SingleColumnRestriction.AnnRestriction, SingleColumnRestriction.ContainsRestriction, SingleColumnRestriction.EQRestriction, SingleColumnRestriction.INRestriction, SingleColumnRestriction.InRestrictionWithMarker, SingleColumnRestriction.InRestrictionWithValues, SingleColumnRestriction.IsNotNullRestriction, SingleColumnRestriction.LikeRestriction, SingleColumnRestriction.SliceRestriction, TokenRestriction, TokenRestriction.EQRestriction, TokenRestriction.SliceRestriction

public interface Restriction

Implementation of this class must be immutable.

  • Method Details

    • isOnToken

      default boolean isOnToken()
    • getFirstColumn

      ColumnMetadata getFirstColumn()
      Returns the definition of the first column.
      Returns:
      the definition of the first column.
    • getLastColumn

      ColumnMetadata getLastColumn()
      Returns the definition of the last column.
      Returns:
      the definition of the last column.
    • getColumnDefs

      List<ColumnMetadata> getColumnDefs()
      Returns the column definitions in position order.
      Returns:
      the column definitions in position order.
    • addFunctionsTo

      void addFunctionsTo(List<Function> functions)
      Adds all functions (native and user-defined) used by any component of the restriction to the specified list.
      Parameters:
      functions - the list to add to
    • hasSupportingIndex

      boolean hasSupportingIndex(IndexRegistry indexRegistry)
      Check if the restriction is on indexed columns.
      Parameters:
      indexRegistry - the index registry
      Returns:
      true if the restriction is on indexed columns, false
    • findSupportingIndex

      Index findSupportingIndex(IndexRegistry indexRegistry)
      Find first supporting index for current restriction
      Parameters:
      indexRegistry - the index registry
      Returns:
      index if the restriction is on indexed columns, null
    • findSupportingIndexFromQueryPlan

      Index findSupportingIndexFromQueryPlan(Index.QueryPlan indexQueryPlan)
      Find the first supporting index for the current restriction from an Index.QueryPlan.
      Parameters:
      indexQueryPlan - the index query plan
      Returns:
      index if the restriction is on indexed columns, null
    • needsFiltering

      boolean needsFiltering(Index.Group indexGroup)
      Returns whether this restriction would need filtering if the specified index group were used.
      Parameters:
      indexGroup - an index group
      Returns:
      true if this would need filtering if indexGroup were used, false otherwise
    • addToRowFilter

      void addToRowFilter(RowFilter filter, IndexRegistry indexRegistry, QueryOptions options)
      Adds to the specified row filter the expressions corresponding to this Restriction.
      Parameters:
      filter - the row filter to add expressions to
      indexRegistry - the index registry
      options - the query options