Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.TestAISBuilder.indexColumn()


        builder.table("schema", "item");
        builder.column("schema", "item", "item_id", 0, "MCOMPAT", "int", false);
        builder.column("schema", "item", "order_id", 1, "MCOMPAT", "int", false);
        builder.column("schema", "item", "quantity", 2, "MCOMPAT", "int", false);
        builder.pk("schema", "item");
        builder.indexColumn("schema", "item", Index.PRIMARY, "item_id", 0, true, null);
        builder.joinTables("co", "schema", "customer", "schema", "order");
        builder.joinColumns("co", "schema", "customer", "customer_id", "schema", "order", "customer_id");
        builder.joinTables("oi", "schema", "order", "schema", "item");
        builder.joinColumns("oi", "schema", "order", "order_id", "schema", "item", "item_id");
        builder.table("schema", "state");
View Full Code Here


        builder.table(SCHEMA, I_TABLE);
        builder.column(SCHEMA, I_TABLE, "id", 0, "MCOMPAT", "int", false);
        builder.column(SCHEMA, I_TABLE, "oid", 1, "MCOMPAT", "int", false);
        builder.column(SCHEMA, I_TABLE, "ii", 2, "MCOMPAT", "varchar", 5L, null, true);
        builder.pk(SCHEMA, I_TABLE);
        builder.indexColumn(SCHEMA, I_TABLE, Index.PRIMARY, "id", 0, true, null);
        builder.index(SCHEMA, I_TABLE, "oid");
        builder.indexColumn(SCHEMA, I_TABLE, "oid", "oid", 0, true, null);
        builder.index(SCHEMA, I_TABLE, "ii");
        builder.indexColumn(SCHEMA, I_TABLE, "ii", "ii", 0, true, null);
        builder.basicSchemaIsComplete();
View Full Code Here

        builder.column(SCHEMA, I_TABLE, "oid", 1, "MCOMPAT", "int", false);
        builder.column(SCHEMA, I_TABLE, "ii", 2, "MCOMPAT", "varchar", 5L, null, true);
        builder.pk(SCHEMA, I_TABLE);
        builder.indexColumn(SCHEMA, I_TABLE, Index.PRIMARY, "id", 0, true, null);
        builder.index(SCHEMA, I_TABLE, "oid");
        builder.indexColumn(SCHEMA, I_TABLE, "oid", "oid", 0, true, null);
        builder.index(SCHEMA, I_TABLE, "ii");
        builder.indexColumn(SCHEMA, I_TABLE, "ii", "ii", 0, true, null);
        builder.basicSchemaIsComplete();
        builder.createGroup(O_TABLE, SCHEMA);
        builder.addTableToGroup(O_TABLE, SCHEMA, O_TABLE);
View Full Code Here

        builder.pk(SCHEMA, I_TABLE);
        builder.indexColumn(SCHEMA, I_TABLE, Index.PRIMARY, "id", 0, true, null);
        builder.index(SCHEMA, I_TABLE, "oid");
        builder.indexColumn(SCHEMA, I_TABLE, "oid", "oid", 0, true, null);
        builder.index(SCHEMA, I_TABLE, "ii");
        builder.indexColumn(SCHEMA, I_TABLE, "ii", "ii", 0, true, null);
        builder.basicSchemaIsComplete();
        builder.createGroup(O_TABLE, SCHEMA);
        builder.addTableToGroup(O_TABLE, SCHEMA, O_TABLE);
        builder.joinTables("o/i", SCHEMA, O_TABLE, SCHEMA, I_TABLE);
        builder.joinColumns("o/i", SCHEMA, O_TABLE, "id", SCHEMA, I_TABLE, "oid");
View Full Code Here

        builder.table(SCHEMA, TABLE);
        builder.column(SCHEMA, TABLE, "a", 0, "MCOMPAT", "int", false);
        builder.column(SCHEMA, TABLE, "b", 1, "MCOMPAT", "blob", false);
        builder.column(SCHEMA, TABLE, "c", 2, "MCOMPAT", "mediumblob", false);
        builder.pk(SCHEMA, TABLE);
        builder.indexColumn(SCHEMA, TABLE, Index.PRIMARY, "a", 0, true, null);
        ddl().createTable(session(), builder.akibanInformationSchema().getTable(SCHEMA, TABLE));
        return tableId(SCHEMA, TABLE);
    }
   
    @Test
View Full Code Here

        builder.column(SCHEMA, "c", "c1", 0, "MCOMPAT", "int", false);
        builder.column(SCHEMA, "c", "c3", 1, "MCOMPAT", "char", 3L, null, true);
        builder.column(SCHEMA, "c", "c4", 2, "MCOMPAT", "char", 1L, null, true);
        builder.column(SCHEMA, "c", "c5", 3, "MCOMPAT", "int", true);
        builder.pk(SCHEMA, "c");
        builder.indexColumn(SCHEMA, "c", Index.PRIMARY, "c1", 0, true, null);
        builder.basicSchemaIsComplete();
        builder.createGroup("c", SCHEMA);
        builder.addTableToGroup(C_NAME, SCHEMA, "c");
        builder.groupingIsComplete();
        Table newTable = builder.akibanInformationSchema().getTable(SCHEMA, "c");
View Full Code Here

        Table table = ais.getTable(SCHEMA, "o");
        table.dropColumn("o1");
        TestAISBuilder builder = new TestAISBuilder(ais, typesRegistry());
        builder.column(SCHEMA, "o", "o1", 2, "MCOMPAT", "int", true);
        builder.index(SCHEMA, "o", "x");
        builder.indexColumn(SCHEMA, "o", "x", "o1", 0, true, null);
        builder.index(SCHEMA, "o", "y");
        builder.indexColumn(SCHEMA, "o", "y", "cid", 0, true, null);

        List<TableChange> columnChanges = new ArrayList<>();
        columnChanges.add(TableChange.createDrop("o1"));
View Full Code Here

        TestAISBuilder builder = new TestAISBuilder(ais, typesRegistry());
        builder.column(SCHEMA, "o", "o1", 2, "MCOMPAT", "int", true);
        builder.index(SCHEMA, "o", "x");
        builder.indexColumn(SCHEMA, "o", "x", "o1", 0, true, null);
        builder.index(SCHEMA, "o", "y");
        builder.indexColumn(SCHEMA, "o", "y", "cid", 0, true, null);

        List<TableChange> columnChanges = new ArrayList<>();
        columnChanges.add(TableChange.createDrop("o1"));
        columnChanges.add(TableChange.createAdd("o1"));
        List<TableChange> indexChanges = new ArrayList<>();
View Full Code Here

        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        builder.table(SCHEMA, C_TABLE);
        builder.column(SCHEMA, C_TABLE, "c2", 0, "MCOMPAT", "int", true);
        builder.column(SCHEMA, C_TABLE, "c1", 1, "MCOMPAT", "int", false);
        builder.pk(SCHEMA, C_TABLE);
        builder.indexColumn(SCHEMA, C_TABLE, Index.PRIMARY, "c1", 0, true, null);
        builder.index(SCHEMA, C_TABLE, "c2");
        builder.indexColumn(SCHEMA, C_TABLE, "c2", "c2", 0, true, null);
        builder.basicSchemaIsComplete();
        builder.createGroup(C_TABLE, SCHEMA);
        builder.addTableToGroup(C_NAME, SCHEMA, C_TABLE);
View Full Code Here

        builder.column(SCHEMA, C_TABLE, "c2", 0, "MCOMPAT", "int", true);
        builder.column(SCHEMA, C_TABLE, "c1", 1, "MCOMPAT", "int", false);
        builder.pk(SCHEMA, C_TABLE);
        builder.indexColumn(SCHEMA, C_TABLE, Index.PRIMARY, "c1", 0, true, null);
        builder.index(SCHEMA, C_TABLE, "c2");
        builder.indexColumn(SCHEMA, C_TABLE, "c2", "c2", 0, true, null);
        builder.basicSchemaIsComplete();
        builder.createGroup(C_TABLE, SCHEMA);
        builder.addTableToGroup(C_NAME, SCHEMA, C_TABLE);
        builder.groupingIsComplete();
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.