Top Description Fields Constructors Methods
org.h2.index

public final Class RecursiveIndex

extends QueryExpressionIndex
Class Inheritance
Imports
java.util.ArrayList, org.h2.api.ErrorCode, org.h2.command.Parser, org.h2.command.query.AllColumnsForPlan, .Query, .SelectUnion, org.h2.engine.SessionLocal, org.h2.expression.Parameter, org.h2.message.DbException, org.h2.result.LocalResult, .ResultInterface, .SearchRow, .SortOrder, org.h2.table.CTE, .QueryExpressionTable, .TableFilter, org.h2.value.Value

A recursive index.

Field Summary

Modifier and TypeField and Description
private final SessionLocal
Inherited from org.h2.index.QueryExpressionIndex:
originalParametersqueryquerySQLtable

Constructor Summary

AccessConstructor and Description
public
RecursiveIndex(QueryExpressionTable
the query expression table
table
,
String
the query SQL
querySQL
,
ArrayList<Parameter>
the original parameters
originalParameters
,
SessionLocal
the session
session
)

Creates a new instance of a recursive index.

Method Summary

Modifier and TypeMethod and Description
public Cursor
find(SessionLocal
the session
session
,
SearchRow
the first row, or null for no limit
first
,
SearchRow
the last row, or null for no limit
last
,
boolean
if true, iterate in reverse (descending) order
reverse
)

Implements abstract org.h2.index.Index.find.

Find a row or a list of rows and create a cursor to iterate over the result.

public double
getCost(SessionLocal
the session
session
,
int[]
per-column comparison bit masks, null means 'always false', see constants in IndexCondition
masks
,
TableFilter[]
all joined table filters
filters
,
int
the current table filter index
filter
,
SortOrder
the sort order
sortOrder
,
AllColumnsForPlan
the set of all columns
allColumnsSet
)

Implements abstract org.h2.index.Index.getCost.

Estimate the cost to search for rows given the search mask.

public boolean
Inherited from org.h2.index.QueryExpressionIndex:
addcheckRenameclosegetPlanSQLgetQuerygetRowCountgetRowCountApproximationneedRebuildremoveremovetruncate

Field Detail

createSessionback to summary
private final SessionLocal createSession

Constructor Detail

RecursiveIndexback to summary
public RecursiveIndex(QueryExpressionTable table, String querySQL, ArrayList<Parameter> originalParameters, SessionLocal session)

Creates a new instance of a recursive index.

Parameters
table:QueryExpressionTable

the query expression table

querySQL:String

the query SQL

originalParameters:ArrayList<Parameter>

the original parameters

session:SessionLocal

the session

Method Detail

findback to summary
public Cursor find(SessionLocal session, SearchRow first, SearchRow last, boolean reverse)

Implements abstract org.h2.index.Index.find.

Doc from org.h2.index.Index.find.

Find a row or a list of rows and create a cursor to iterate over the result.

Parameters
session:SessionLocal

the session

first:SearchRow

the first row, or null for no limit

last:SearchRow

the last row, or null for no limit

reverse:boolean

if true, iterate in reverse (descending) order

Returns:Cursor

the cursor to iterate over the results

Annotations
@Override
getCostback to summary
public double getCost(SessionLocal session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, AllColumnsForPlan allColumnsSet)

Implements abstract org.h2.index.Index.getCost.

Doc from org.h2.index.Index.getCost.

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.

Parameters
session:SessionLocal

the session

masks:int[]

per-column comparison bit masks, null means 'always false', see constants in IndexCondition

filters:TableFilter[]

all joined table filters

filter:int

the current table filter index

sortOrder:SortOrder

the sort order

allColumnsSet:AllColumnsForPlan

the set of all columns

Returns:double

the estimated cost

Annotations
@Override
isExpiredback to summary
public boolean isExpired()

Implements abstract org.h2.index.QueryExpressionIndex.isExpired.

Annotations
@Override