Search in sources :

Example 1 with IndexCursor

use of org.h2.index.IndexCursor in project h2database by h2database.

the class JoinBatch method start.

private void start() {
    // initialize current row
    current = new JoinRow(new Object[filters.length]);
    // initialize top cursor
    Cursor cursor;
    if (batchedSubQuery) {
        assert viewTopFutureCursor != null;
        cursor = get(viewTopFutureCursor);
    } else {
        // setup usual index cursor
        TableFilter f = top.filter;
        IndexCursor indexCursor = f.getIndexCursor();
        indexCursor.find(f.getSession(), f.getIndexConditions());
        cursor = indexCursor;
    }
    current.updateRow(top.id, cursor, JoinRow.S_NULL, JoinRow.S_CURSOR);
    // we need fake first row because batchedNext always will move to the
    // next row
    JoinRow fake = new JoinRow(null);
    fake.next = current;
    current = fake;
}
Also used : IndexCursor(org.h2.index.IndexCursor) Cursor(org.h2.index.Cursor) IndexCursor(org.h2.index.IndexCursor) ViewCursor(org.h2.index.ViewCursor)

Aggregations

Cursor (org.h2.index.Cursor)1 IndexCursor (org.h2.index.IndexCursor)1 ViewCursor (org.h2.index.ViewCursor)1