Class SingleCursor<T>
- java.lang.Object
-
- org.apache.ignite.internal.cache.query.index.SingleCursor<T>
-
- Type Parameters:
T- class of value to return.
- All Implemented Interfaces:
GridCursor<T>
public class SingleCursor<T> extends Object implements GridCursor<T>
Cursor that holds single value only.
-
-
Constructor Summary
Constructors Constructor Description SingleCursor(T val)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget()Note that this implementation violates the contract of GridCusror.booleannext()Attempt to move cursor position forward.
-
-
-
Constructor Detail
-
SingleCursor
public SingleCursor(T val)
-
-
Method Detail
-
next
public boolean next()
Attempt to move cursor position forward.- Specified by:
nextin interfaceGridCursor<T>- Returns:
trueIf we were able to move position of cursor forward.
-
get
public T get() throws IgniteCheckedException
Note that this implementation violates the contract of GridCusror. It must be "before first" but this implementation handles both cases: "before first" and "on first". Current implementation of SQL with H2 relies on thisnullfor queries like "select max(col) from table". This should be fixed for other SQL engines. https://issues.apache.org/jira/browse/IGNITE-14303.- Specified by:
getin interfaceGridCursor<T>- Returns:
- Element at current position.
- Throws:
IgniteCheckedException- If failed.
-
-