Examples of tableRowType()


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

        createFromDDL(SCHEMA,
          "CREATE TABLE t1(id INT PRIMARY KEY NOT NULL, s VARCHAR(128)) STORAGE_FORMAT tuple");
        int t1 = ddl().getTableId(session(), new TableName(SCHEMA, "t1"));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType t1Type = schema.tableRowType(getTable(t1));
        StoreAdapter adapter = newStoreAdapter(schema);

        txnService().beginTransaction(session());

        Object[] r1 = { 1L, "Fred" };
View Full Code Here

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

          "CREATE TABLE child(id INT PRIMARY KEY NOT NULL, pid INT, GROUPING FOREIGN KEY(pid) REFERENCES parent(id), s VARCHAR(128));");
        int parent = ddl().getTableId(session(), new TableName(SCHEMA, "parent"));
        int child = ddl().getTableId(session(), new TableName(SCHEMA, "child"));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType parentType = schema.tableRowType(getTable(parent));
        RowType childType = schema.tableRowType(getTable(child));
        StoreAdapter adapter = newStoreAdapter(schema);

        txnService().beginTransaction(session());
View Full Code Here

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

        int parent = ddl().getTableId(session(), new TableName(SCHEMA, "parent"));
        int child = ddl().getTableId(session(), new TableName(SCHEMA, "child"));

        Schema schema = SchemaCache.globalSchema(ddl().getAIS(session()));
        RowType parentType = schema.tableRowType(getTable(parent));
        RowType childType = schema.tableRowType(getTable(child));
        StoreAdapter adapter = newStoreAdapter(schema);

        txnService().beginTransaction(session());

        Object[] r1 = { 1L, "Margaret" };
View Full Code Here

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

        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

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

        // 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(
View Full Code Here

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

        // 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[]{
View Full Code Here

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

        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

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

        );

        runAlter(ChangeLevel.GROUP, "ALTER TABLE i ADD GROUPING FOREIGN KEY(spare_id) REFERENCES o(id)");

        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);
        compareRows(
View Full Code Here

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

        runAlter(ChangeLevel.GROUP, "ALTER TABLE i ADD GROUPING FOREIGN KEY(spare_id) REFERENCES o(id)");

        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);
        compareRows(
                new Row[] {
View Full Code Here

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

        runAlter(ChangeLevel.GROUP, "ALTER TABLE i ADD GROUPING FOREIGN KEY(spare_id) REFERENCES o(id)");

        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);
        compareRows(
                new Row[] {
                        // null c
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.