Package com.foundationdb.qp.operator

Examples of com.foundationdb.qp.operator.Cursor.openTopLevel()


                               API.Ordering ordering,         
                               long expected[])
    {
        Operator plan = indexScan_Default(idxRowType, bounded(1, bLo, lowInclusive, bHi, hiInclusive), ordering);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        cursor.jump(indexRow(targetId), INDEX_ROW_SELECTOR);

        Row row;
        List<Row> actualRows = new ArrayList<>();
       
View Full Code Here


                       API.Ordering ordering,         
                       long expected[])
    {
        Operator plan = indexScan_Default(idxRowType, range, ordering);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();

        cursor.jump(indexRowWithId(targetId), INDEX_ROW_SELECTOR);

        Row row;
        List<Row> actualRows = new ArrayList<>();
View Full Code Here

            pSource.bind(col.getFieldDef(), rowData);
            queryBindings.setValue(i, pSource);
        }
        try {
            Row row;
            cursor.openTopLevel();
            while((row = cursor.next()) != null) {
                Table aTable = row.rowType().table();
                RowData data = adapter.rowData(aTable.rowDef(), row, new RowDataCreator());
                maintainGroupIndexes(session,
                                     aTable,
View Full Code Here

                for (int i = 0; i < key.size(); i++) {
                    ValueSource value = ValueSources.fromObject(key.get(i), null).value();
                    context.queryBindings.setValue(i, value);
                }
   
                cursor.openTopLevel();
                Row row;
                while ((row = cursor.next()) != null) {
                    // Do Nothing - the act of reading the cursor
                    // does the delete row processing.
                    // TODO: Check that we got 1 row through.
View Full Code Here

    public ExecuteResults execute(EmbeddedQueryContext context, QueryBindings bindings) {
        Cursor cursor = null;
        try {
            context.initStore(getSchema());
            cursor = API.cursor(resultOperator, context, bindings);
            cursor.openTopLevel();
            ExecuteResults result = new ExecuteResults(cursor);
            cursor = null;
            return result;
        } catch (RuntimeException e) {
            LOG.error("caught error: {}", e.toString());
View Full Code Here

    }

    @Override
    public Cursor openCursor(PostgresQueryContext context, QueryBindings bindings) {
        Cursor cursor = API.cursor(resultOperator, context, bindings);
        cursor.openTopLevel();
        return cursor;
    }

    @Override
    public void closeCursor(Cursor cursor) {
View Full Code Here

        long[] idOrdering = longs(1000, 1001, 1002, 1003,
                                  1010, 1011, 1012, 1013,
                                  1020, 1021, 1022, 1023,
                                  1030, 1031, 1032, 1033);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        testJump(cursor, idOrdering, 0);
        testJump(cursor, idOrdering, -1);
        cursor.closeTopLevel();
    }
View Full Code Here

        long[] idOrdering = longs(1000, 1001, 1002, 1003,
                                  1010, 1011, 1012, 1013,
                                  1020, 1021, 1022, 1023,
                                  1030, 1031, 1032, 1033);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        testJump(cursor, idOrdering, 0);
        testJump(cursor, idOrdering, 1);
        cursor.closeTopLevel();
    }
View Full Code Here

        long[] idOrdering = longs(1001, 1000, 1003, 1002,
                                  1011, 1010, 1013, 1012,
                                  1021, 1020, 1023, 1022,
                                  1031, 1030, 1033, 1032);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        testJump(cursor, idOrdering, 0);
        testJump(cursor, idOrdering, -1);
        cursor.closeTopLevel();
    }
View Full Code Here

        long[] idOrdering = longs(1001, 1000, 1003, 1002,
                                  1011, 1010, 1013, 1012,
                                  1021, 1020, 1023, 1022,
                                  1031, 1030, 1033, 1032);
        Cursor cursor = cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        testJump(cursor, idOrdering, 0);
        testJump(cursor, idOrdering, 1);
        cursor.closeTopLevel();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.