Package com.foundationdb.ais.model

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


        builder.addJoinToGroup("group", "co", 0);
        builder.addJoinToGroup("group", "oi", 0);
        builder.addJoinToGroup("group", "ca", 0);
        builder.createGroup("state", "schema");
        builder.addTableToGroup("state", "schema", "state");
        builder.groupingIsComplete();
       
        SchemaFactory factory = new SchemaFactory ("schema");
        factory.buildRowDefs(builder.akibanInformationSchema());
        return new Schema(builder.akibanInformationSchema());
    }
View Full Code Here


        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");
        builder.addJoinToGroup(O_TABLE, "o/i", 0);
        builder.groupingIsComplete();

        try {
            Table newDef = builder.akibanInformationSchema().getTable(I_NAME);
            runAlter(ChangeLevel.GROUP, I_NAME, newDef, Arrays.asList(TableChange.createModify("oid", "oid")), NO_CHANGES);
            fail("Expected NotNullViolationException");
View Full Code Here

        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");

        List<TableChange> changes = new ArrayList<>();
        changes.add(TableChange.createAdd("c5"));
        changes.add(TableChange.createDrop("c2"));
View Full Code Here

        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();

        runAlter(ChangeLevel.TABLE,
                 C_NAME, builder.akibanInformationSchema().getTable(C_NAME),
                 Arrays.asList(TableChange.createModify("c1", "c1"), TableChange.createModify("c2", "c2")),
                 NO_CHANGES);
View Full Code Here

        builder.createGroup("group", "groupschema");
        builder.addJoinToGroup("group", "co", 0);
        builder.addJoinToGroup("group", "oi", 0);
        builder.createGroup("state", "schema");
        builder.addTableToGroup("state", "schema", "state");
        builder.groupingIsComplete();
       
        SchemaFactory factory = new SchemaFactory ("schema");
        factory.buildRowDefs(builder.akibanInformationSchema());
        return new Schema(builder.akibanInformationSchema());
    }
View Full Code Here

        builder.index(SCHEMA, TABLE, "v");
        builder.indexColumn(SCHEMA, TABLE, "v", "v", 0, true, indexedLength);
        builder.createGroup(TABLE, SCHEMA);
        builder.addTableToGroup(TABLE, SCHEMA, TABLE);
        builder.basicSchemaIsComplete();
        builder.groupingIsComplete();
        return builder.akibanInformationSchema();
    }

    private static void validate(AkibanInformationSchema ais) {
        ais.validate(Collections.<AISValidation>singleton(new IndexColumnIsNotPartial())).throwIfNecessary();
View Full Code Here

        builder.addJoinToGroup("group", "oi", 0);
        builder.createGroup("state", "schema");
        builder.addTableToGroup("state", "schema", "state");
        builder.createGroup("customer", "schema");
        builder.addTableToGroup("customer", "schema", "customer2");
        builder.groupingIsComplete();
       
        SchemaFactory factory = new SchemaFactory ("schema");
        factory.buildRowDefs(builder.akibanInformationSchema());
        return new Schema(builder.akibanInformationSchema());
    }
View Full Code Here

            builder.addTableToGroup(table, schema, table);
           
        }
       
        builder.basicSchemaIsComplete();
        builder.groupingIsComplete();

        Map<Table, Integer> ordinalMap = new HashMap<>();
        List<Table> remainingTables = new ArrayList<>();
        // Add all roots
        for(Table table : ais.getTables().values()) {
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.