Package org.h2.index
Class IndexCursor
- java.lang.Object
-
- org.h2.index.IndexCursor
-
-
Constructor Summary
Constructors Constructor Description IndexCursor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancanUseIndexForIn(Index index, Column[] columns)ReturntrueifIndex.getIndexColumns()and thecolumnsparameter contains the same elements in the same order.voidfind(SessionLocal s, java.util.ArrayList<IndexCondition> indexConditions)Re-evaluate the start and end values of the index search for rows.Rowget()Get the complete current row.SearchRowgetEnd()Get end search row.SearchRowgetSearchRow()Get the current row.SearchRowgetStart()Get start search row.booleanisAlwaysFalse()Check if the result is empty for sure.booleannext()Skip to the next row if one is available.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, boolean reverse)
-
-
-
Method Detail
-
setIndex
public void setIndex(Index index, boolean reverse)
-
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
public static boolean canUseIndexForIn(Index index, Column[] columns)
ReturntrueifIndex.getIndexColumns()and thecolumnsparameter contains the same elements in the same order. All column of the index must match the column in thecolumnsarray, or it must be a VIEW index (where the column is null).- See Also:
IndexCondition.getMask(ArrayList)
-
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.
-
-