Package org.h2.index

Class RecursiveIndex

    • Constructor Detail

      • RecursiveIndex

        public RecursiveIndex​(QueryExpressionTable table,
                              java.lang.String querySQL,
                              java.util.ArrayList<Parameter> originalParameters,
                              SessionLocal session)
        Creates a new instance of a recursive index.
        Parameters:
        table - the query expression table
        querySQL - the query SQL
        originalParameters - the original parameters
        session - the session
    • Method Detail

      • getCost

        public double getCost​(SessionLocal session,
                              int[] masks,
                              TableFilter[] filters,
                              int filter,
                              SortOrder sortOrder,
                              AllColumnsForPlan allColumnsSet,
                              boolean isSelectCommand)
        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
        isSelectCommand - is this for an SELECT command
        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