use of org.apache.ignite.internal.processors.query.h2.H2Cursor in project ignite by apache.
the class H2TreeIndex method find.
/**
* {@inheritDoc}
*/
@Override
public Cursor find(Session ses, SearchRow lower, SearchRow upper) {
assert lower == null || lower instanceof H2Row : lower;
assert upper == null || upper instanceof H2Row : upper;
try {
T2<IndexRow, IndexRow> key = prepareIndexKeys(lower, upper);
QueryContext qctx = ses != null ? H2Utils.context(ses) : null;
GridCursor<IndexRow> cursor = queryIndex.find(key.get1(), key.get2(), true, true, segment(qctx), idxQryContext(qctx));
GridCursor<H2Row> h2cursor = new IndexValueCursor<>(cursor, this::mapIndexRow);
return new H2Cursor(h2cursor);
} catch (IgniteCheckedException e) {
throw DbException.convert(e);
}
}
Aggregations