Package com.foundationdb.qp.rowtype

Examples of com.foundationdb.qp.rowtype.Schema


        }
    }

    private void doSort() {
        InOutTap tap = Tap.createTimer("test");
        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        StoreAdapter adapter = newStoreAdapter(schema);

        Table table = getTable(SCHEMA, TABLE);
        RowType rowType = schema.tableRowType(table);
        API.Ordering ordering = API.ordering();
        ordering.append(ExpressionGenerators.field(rowType, 1), true);

        QueryContext context = queryContext(adapter);
        QueryBindings bindings = context.createBindings();
View Full Code Here


    }

    @Override
    protected void setupPostCreateSchema()
    {
        schema = new Schema(ais());
        parentRowType = schema.tableRowType(table(parent));
        childRowType = schema.tableRowType(table(child));
        parentPidIndexRowType = indexType(parent, "pid");
        parentXIndexRowType = indexType(parent, "x1", "x2");
        parentYIndexRowType = indexType(parent, "y");
View Full Code Here

                "id int not null primary key");
    }

    @Override
    protected void setupPostCreateSchema() {
        schema = new Schema(ais());
        tRowType = schema.tableRowType(table(t));
        group = group(t);
        List<Row> rows = new ArrayList<>();
        Random random = new Random(123456789);
        long key = 0;
View Full Code Here

    }

    @Override
    protected void setupPostCreateSchema()
    {
        schema = new Schema(ais());
        pointRowType = schema.tableRowType(table(point));
        pointOrdinal = pointRowType.table().getOrdinal();
        latLonIndexRowType = indexType(point, "lat", "lon");
        beforeLatLonIndexRowType = indexType(point, "before", "lat", "lon");
        latLonAfterIndexRowType = indexType(point, "lat", "lon", "after");
View Full Code Here

        createIndex("schema", "address", "address", "address");
        createLeftGroupIndex(new TableName("schema", "customer"), "cname_ioid", "customer.name", "item.oid");
    }

    protected void setupPostCreateSchema() {
        schema = new Schema(ais());
        customerRowType = schema.tableRowType(table(customer));
        orderRowType = schema.tableRowType(table(order));
        itemRowType = schema.tableRowType(table(item));
        addressRowType = schema.tableRowType(table(address));
        orderHKeyRowType = schema.newHKeyRowType(orderRowType.hKey());
View Full Code Here

    }

    @Override
    protected void setupPostCreateSchema()
    {
        schema = new Schema(ais());
        parentRowType = schema.tableRowType(table(parent));
        childRowType = schema.tableRowType(table(child));
        parentOrdinal = parentRowType.table().getOrdinal();
        childOrdinal = childRowType.table().getOrdinal();
        cSpatialIndexRowType = groupIndexType(groupName, "parent.pbefore", "child.clat", "child.clon", "child.cafter");
View Full Code Here

                        row(iid, 300, 30, 330)
        );
    }

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

        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);
        QueryContext queryContext = new SimpleQueryContext(adapter);
        QueryBindings queryBindings = queryContext.createBindings();
        compareRows(
                expectedRows,
View Full Code Here

        createAndLoadCOI();

        // Will yield 2 groups: C-O and I
        runAlter(ChangeLevel.GROUP, "ALTER TABLE o DROP PRIMARY KEY");

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType cType = schema.tableRowType(getTable(SCHEMA, "c"));
        RowType oType = schema.tableRowType(getTable(SCHEMA, "o"));
        RowType iType = schema.tableRowType(getTable(SCHEMA, "i"));
        StoreAdapter adapter = newStoreAdapter(schema);
        int pk = 1;
        compareRows(
                new Row[]{
                        testRow(cType, 1, "a"),
View Full Code Here

        AkibanInformationSchema ais = ddl().getAIS(session());
        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

Related Classes of com.foundationdb.qp.rowtype.Schema

Copyright © 2018 www.massapicom. 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.