Package org.h2.index
Class IndexSort
- java.lang.Object
-
- org.h2.index.IndexSort
-
-
Field Summary
Fields Modifier and Type Field Description static intFULLY_SORTEDUsed instead of actual number of sorted columns when post-sorting isn't needed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IndexSort o)IndexgetIndex()Returns the index.intgetSortedColumns()Returns number of sorted columns.booleanisReverse()Returns whether index must be iterated in reverse order.
-
-
-
Field Detail
-
FULLY_SORTED
public static final int FULLY_SORTED
Used instead of actual number of sorted columns when post-sorting isn't needed.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IndexSort
public IndexSort(Index index, boolean reverse)
Creates an index sorting information for complete index sort.- Parameters:
index- the indexreverse- whether index must be iterated in reverse order
-
IndexSort
public IndexSort(Index index, int sortedColumns, boolean reverse)
Creates an index sorting information for index sort.- Parameters:
index- the indexsortedColumns- a positive number of sorted columns for partial index sorts, orFULLY_SORTEDfor complete index sortsreverse- whether index must be iterated in reverse order
-
-
Method Detail
-
getIndex
public Index getIndex()
Returns the index.- Returns:
- the index
-
getSortedColumns
public int getSortedColumns()
Returns number of sorted columns.- Returns:
- positive number of sorted columns for partial index sorts, or
FULLY_SORTEDfor complete index sorts
-
isReverse
public boolean isReverse()
Returns whether index must be iterated in reverse order.- Returns:
truefor reverse order,falsefor natural order
-
-