Examples of indexColumn()


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

        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

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

        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

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

        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

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

        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

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

        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

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

        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

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

        String COLUMN = "c1";
        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        builder.table(SCHEMA, TABLE);
        builder.column(SCHEMA, TABLE, COLUMN, 0, "MCOMPAT", "TINYINT", true, true);
        builder.unique(SCHEMA, TABLE, "c1");
        builder.indexColumn(SCHEMA, TABLE, COLUMN, COLUMN, 0, true, null);
        ddl().createTable(session(), builder.akibanInformationSchema().getTable(SCHEMA, TABLE));
        final int tid = tableId(SCHEMA, TABLE);
        Object[] data = new Object[1];
        writeRows(row(tid, data));
        writeRows(row(tid, data));
View Full Code Here

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

    private void runTest(int fieldCount) {
        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        builder.table(SCHEMA, TABLE);
        builder.column(SCHEMA, TABLE, "id", 0, "MCOMPAT", "int", false);
        builder.pk(SCHEMA, TABLE);
        builder.indexColumn(SCHEMA, TABLE, Index.PRIMARY, "id", 0, true, null);
        for(int i = 1; i <= fieldCount; ++i) {
            String colName = "lt_" + i;
            builder.column(SCHEMA, TABLE, colName, i, "MCOMPAT", "LONGTEXT", true);
        }
        Table table = builder.akibanInformationSchema().getTable(SCHEMA, TABLE);
View Full Code Here

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

        TestAISBuilder builder = new TestAISBuilder(TestTypesRegistry.MCOMPAT);
        builder.table("schema", "customer");
        builder.column("schema", "customer", "customer_id", 0, "MCOMPAT", "int", false);
        builder.column("schema", "customer", "customer_name", 1, "MCOMPAT", "varchar", 64L, null, false);
        builder.pk("schema", "customer");
        builder.indexColumn("schema", "customer", Index.PRIMARY, "customer_id", 0, true, null);
        builder.table("schema", "order");
        builder.column("schema", "order", "order_id", 0, "MCOMPAT", "int", false);
        builder.column("schema", "order", "customer_id", 1, "MCOMPAT", "int", false);
        builder.column("schema", "order", "order_date", 2, "MCOMPAT", "int", false);
        builder.pk("schema", "order");
View Full Code Here

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

        builder.table("schema", "order");
        builder.column("schema", "order", "order_id", 0, "MCOMPAT", "int", false);
        builder.column("schema", "order", "customer_id", 1, "MCOMPAT", "int", false);
        builder.column("schema", "order", "order_date", 2, "MCOMPAT", "int", false);
        builder.pk("schema", "order");
        builder.indexColumn("schema", "order", Index.PRIMARY, "order_id", 0, true, null);
        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");
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.