Package org.h2.index
Class IndexCursor
- java.lang.Object
-
- org.h2.index.IndexCursor
-
-
Field Summary
Fields Modifier and Type Field Description private booleanalwaysFalseprivate Cursorcursorprivate SearchRowendprivate ColumninColumnprivate Indexindexprivate IndexColumn[]indexColumnsprivate Value[]inListprivate intinListIndexprivate ResultInterfaceinResultprivate SearchRowintersectsprivate SessionLocalsessionprivate SearchRowstartprivate Tabletable
-
Constructor Summary
Constructors Constructor Description IndexCursor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancanUseIndexFor(Column column)private booleancanUseIndexForIn(Column column)voidfind(SessionLocal s, java.util.ArrayList<IndexCondition> indexConditions)Re-evaluate the start and end values of the index search for rows.private voidfind(Value v)Rowget()Get the complete current row.SearchRowgetEnd()Get end search row.private ValuegetMax(Value a, Value b, boolean bigger)SearchRowgetSearchRow()Get the current row.private SearchRowgetSearchRow(SearchRow row, int columnId, Value v, boolean max)private SearchRowgetSpatialSearchRow(SearchRow row, int columnId, Value v)SearchRowgetStart()Get start search row.booleanisAlwaysFalse()Check if the result is empty for sure.booleannext()Skip to the next row if one is available.private voidnextCursor()voidprepare(SessionLocal s, java.util.ArrayList<IndexCondition> indexConditions)Prepare this index cursor to make a lookup in index.booleanprevious()Skip to the previous row if one is available.voidsetIndex(Index index)
-
-
-
Field Detail
-
session
private SessionLocal session
-
index
private Index index
-
table
private Table table
-
indexColumns
private IndexColumn[] indexColumns
-
alwaysFalse
private boolean alwaysFalse
-
start
private SearchRow start
-
end
private SearchRow end
-
intersects
private SearchRow intersects
-
cursor
private Cursor cursor
-
inColumn
private Column inColumn
-
inListIndex
private int inListIndex
-
inList
private Value[] inList
-
inResult
private ResultInterface inResult
-
-
Method Detail
-
setIndex
public void setIndex(Index index)
-
prepare
public void prepare(SessionLocal s, java.util.ArrayList<IndexCondition> indexConditions)
Prepare this index cursor to make a lookup in index.- Parameters:
s- Session.indexConditions- Index conditions.
-
find
public void find(SessionLocal s, java.util.ArrayList<IndexCondition> indexConditions)
Re-evaluate the start and end values of the index search for rows.- Parameters:
s- the sessionindexConditions- the index conditions
-
canUseIndexForIn
private boolean canUseIndexForIn(Column column)
-
canUseIndexFor
private boolean canUseIndexFor(Column column)
-
isAlwaysFalse
public boolean isAlwaysFalse()
Check if the result is empty for sure.- Returns:
- true if it is
-
getStart
public SearchRow getStart()
Get start search row.- Returns:
- search row
-
getEnd
public SearchRow getEnd()
Get end search row.- Returns:
- search row
-
get
public Row get()
Description copied from interface:CursorGet the complete current row. All column are available.
-
getSearchRow
public SearchRow 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
private void find(Value v)
-
-