Package org.h2.index
Class IndexCursor
java.lang.Object
org.h2.index.IndexCursor
- All Implemented Interfaces:
Cursor
The filter used to walk through an index. This class supports IN(..)
and IN(SELECT ...) optimizations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Cursorprivate SearchRowprivate Columnprivate Indexprivate IndexColumn[]private Value[]private intprivate ResultInterfaceprivate SearchRowprivate SessionLocalprivate SearchRowprivate Table -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancanUseIndexFor(Column column) private booleancanUseIndexForIn(Column column) voidfind(SessionLocal s, ArrayList<IndexCondition> indexConditions) Re-evaluate the start and end values of the index search for rows.private voidget()Get the complete current row.getEnd()Get end search row.private ValueGet the current row.private SearchRowgetSearchRow(SearchRow row, int columnId, Value v, boolean max) private SearchRowgetSpatialSearchRow(SearchRow row, int columnId, Value v) getStart()Get start search row.booleanCheck if the result is empty for sure.booleannext()Skip to the next row if one is available.private voidvoidprepare(SessionLocal s, ArrayList<IndexCondition> indexConditions) Prepare this index cursor to make a lookup in index.booleanprevious()Skip to the previous row if one is available.void
-
Field Details
-
session
-
index
-
table
-
indexColumns
-
alwaysFalse
private boolean alwaysFalse -
start
-
end
-
intersects
-
cursor
-
inColumn
-
inListIndex
private int inListIndex -
inList
-
inResult
-
-
Constructor Details
-
IndexCursor
public IndexCursor()
-
-
Method Details
-
setIndex
-
prepare
Prepare this index cursor to make a lookup in index.- Parameters:
s- Session.indexConditions- Index conditions.
-
find
Re-evaluate the start and end values of the index search for rows.- Parameters:
s- the sessionindexConditions- the index conditions
-
canUseIndexForIn
-
canUseIndexFor
-
getSpatialSearchRow
-
getSearchRow
-
getMax
-
isAlwaysFalse
public boolean isAlwaysFalse()Check if the result is empty for sure.- Returns:
- true if it is
-
getStart
Get start search row.- Returns:
- search row
-
getEnd
Get end search row.- Returns:
- search row
-
get
Description copied from interface:CursorGet the complete current row. All column are available. -
getSearchRow
Description copied from interface:CursorGet the current row. Only the data for indexed columns is available in this row.- Specified by:
getSearchRowin interfaceCursor- Returns:
- the search row
-
next
public boolean next()Description copied from interface:CursorSkip to the next row if one is available. -
nextCursor
private void nextCursor() -
find
-
previous
public boolean previous()Description copied from interface:CursorSkip to the previous row if one is available. No filtering is made here.
-