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 boolean
private Cursor
private SearchRow
private Column
private Index
private IndexColumn[]
private Value[]
private int
private ResultInterface
private SearchRow
private SessionLocal
private SearchRow
private Table
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canUseIndexFor
(Column column) private boolean
canUseIndexForIn
(Column column) void
find
(SessionLocal s, ArrayList<IndexCondition> indexConditions) Re-evaluate the start and end values of the index search for rows.private void
get()
Get the complete current row.getEnd()
Get end search row.private Value
Get the current row.private SearchRow
getSearchRow
(SearchRow row, int columnId, Value v, boolean max) private SearchRow
getSpatialSearchRow
(SearchRow row, int columnId, Value v) getStart()
Get start search row.boolean
Check if the result is empty for sure.boolean
next()
Skip to the next row if one is available.private void
void
prepare
(SessionLocal s, ArrayList<IndexCondition> indexConditions) Prepare this index cursor to make a lookup in index.boolean
previous()
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:Cursor
Get the complete current row. All column are available. -
getSearchRow
Description copied from interface:Cursor
Get the current row. Only the data for indexed columns is available in this row.- Specified by:
getSearchRow
in interfaceCursor
- Returns:
- the search row
-
next
public boolean next()Description copied from interface:Cursor
Skip to the next row if one is available. -
nextCursor
private void nextCursor() -
find
-
previous
public boolean previous()Description copied from interface:Cursor
Skip to the previous row if one is available. No filtering is made here.
-