Examples of indexRowType()


Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

        return API.filter_Default(API.groupScan_Default(table.getGroup()), Arrays.asList(schema.tableRowType(table)));
    }

    protected Operator scanIndexPlan(Index index) {
        Schema schema = SchemaCache.globalSchema(index.getAIS());
        return API.indexScan_Default(schema.indexRowType(index));
    }

    protected final List<Row> scanAllIndex(Index index) {
        AkibanInformationSchema ais = ais();
        Schema schema = SchemaCache.globalSchema(ais);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

    }

    protected final List<Row> scanAllIndex(Index index) {
        AkibanInformationSchema ais = ais();
        Schema schema = SchemaCache.globalSchema(ais);
        Operator plan = API.indexScan_Default(schema.indexRowType(index));
        return runPlan(session(), schema, plan);
    }

    protected List<Row> writeRow(int tableID, Object... fields) {
        return writeRow(session(), tableID, fields);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

    }

    public Row row(Index index, Object... fields) {
        AkibanInformationSchema ais = ais(session());
        Schema schema = SchemaCache.globalSchema(ais);
        RowType rowType = schema.indexRowType(index);
        return row(rowType, fields);
    }

    public Row row(RowType rowType, Object... fields) {
        if(fields.length < rowType.nFields()) {
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

            row(mid, 41, 4, "y", "two")
        );

        AkibanInformationSchema ais = ais();
        Schema schema = SchemaCache.globalSchema(ais);
        IndexRowType rIndex = schema.indexRowType(ais.getTable(rid).getIndex("name"));
        IndexRowType mdIndex = schema.indexRowType(ais.getTable(mid).getIndex("name_value"));

        /*
        Build something like:
          Intersect_Ordered(skip 2 left, skip 2 right, compare 1)
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

        );

        AkibanInformationSchema ais = ais();
        Schema schema = SchemaCache.globalSchema(ais);
        IndexRowType rIndex = schema.indexRowType(ais.getTable(rid).getIndex("name"));
        IndexRowType mdIndex = schema.indexRowType(ais.getTable(mid).getIndex("name_value"));

        /*
        Build something like:
          Intersect_Ordered(skip 2 left, skip 2 right, compare 1)
            Intersect_Ordered(skip 2 left, skip 1 right, compare 1)
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

     */
    public static Operator generateBranchPlan (AkibanInformationSchema ais, Table table) {
        final Operator indexScan = generateIndexScan(ais, table);
        final Schema schema = SchemaCache.globalSchema(ais);
        PrimaryKey pkey = table.getPrimaryKeyIncludingInternal();
        IndexRowType indexType = schema.indexRowType(pkey.getIndex());
        return generateBranchPlan(table, indexScan, indexType);
    }

    public static Operator generateBranchPlan (Table table, Operator scan, RowType scanType) {
        final Schema schema = (Schema)scanType.schema();
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

        TableRowType tableType = schema.tableRowType(table);

        List<TableRowType> ancestorType = new ArrayList<>(1);
        ancestorType.add (tableType);

        IndexRowType indexType = schema.indexRowType(table.getPrimaryKeyIncludingInternal().getIndex());
       
        Operator indexScan = generateIndexScan (ais, table);
        Operator lookup = API.groupLookup_Default(indexScan,
                table.getGroup(),
                indexType,
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

     */
    private static Operator generateIndexScan (AkibanInformationSchema ais, Table table) {
        final Schema schema = SchemaCache.globalSchema(ais);
        PrimaryKey pkey = table.getPrimaryKeyIncludingInternal();
        final int nkeys = pkey.getColumns().size();
        IndexRowType indexType = schema.indexRowType(pkey.getIndex());

        List<TPreparedExpression> pexprs = new ArrayList<>(nkeys);
        for (int i = 0; i < nkeys; i++) {
            pexprs.add(new TPreparedParameter(i, indexType.typeAt(i)));
        }
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

        );
    }

    private IndexRowType indexRowType(Index index) {
        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        return schema.indexRowType(index);
    }

    private void scanAndCheckIndex(IndexRowType type, Row... expectedRows) {
        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        StoreAdapter adapter = newStoreAdapter(schema);
View Full Code Here

Examples of com.foundationdb.qp.rowtype.Schema.indexRowType()

        Index index = ais.getGroup(C_NAME).getIndex("c1_o1_o2");
        assertNotNull("Index still exists", index);
        assertEquals("Index column count", 2, index.getKeyColumns().size());

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        IndexRowType indexRowType = schema.indexRowType(index);

        StoreAdapter adapter = newStoreAdapter(schema);
        QueryContext queryContext = new SimpleQueryContext(adapter);
        QueryBindings queryBindings = queryContext.createBindings();
        compareRows(
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.