Package com.foundationdb.ais.model

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


        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");
        builder.column("schema", "state", "code", 0, "MCOMPAT", "varchar", 2L, null, false);
        builder.column("schema", "state", "name", 1, "MCOMPAT", "varchar", 50L, null, false);
        builder.table("schema", "address");
        builder.column("schema", "address", "customer_id", 0, "MCOMPAT", "int", false);
        builder.column("schema", "address", "location", 1, "MCOMPAT", "varchar", 50L, null, false);
View Full Code Here


        builder.joinTables("oi", "schema", "order", "schema", "item");
        builder.joinColumns("oi", "schema", "order", "order_id", "schema", "item", "item_id");
        builder.table("schema", "state");
        builder.column("schema", "state", "code", 0, "MCOMPAT", "varchar", 2L, null, false);
        builder.column("schema", "state", "name", 1, "MCOMPAT", "varchar", 50L, null, false);
        builder.table("schema", "address");
        builder.column("schema", "address", "customer_id", 0, "MCOMPAT", "int", false);
        builder.column("schema", "address", "location", 1, "MCOMPAT", "varchar", 50L, null, false);
        builder.column("schema", "address", "zipcode", 2, "MCOMPAT", "int", false);
        builder.joinTables("ca", "schema", "customer", "schema", "address");
        builder.joinColumns("ca", "schema", "customer", "customer_id", "schema", "address", "customer_id");
View Full Code Here

        createAndLoadCAOI_FK(true, true, false);
        writeRow(iid, 1000L, null, "1000");

        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        // stub parent
        builder.table(SCHEMA, O_TABLE);
        builder.column(SCHEMA, O_TABLE, "id", 0, "MCOMPAT", "int", false);
        // Changed child
        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);
View Full Code Here

        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        // stub parent
        builder.table(SCHEMA, O_TABLE);
        builder.column(SCHEMA, O_TABLE, "id", 0, "MCOMPAT", "int", false);
        // Changed child
        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);
View Full Code Here

    private final String SCHEMA = "test";
    private final String TABLE = "blobtest";
   
    private int setUpTable() {
        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        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);
View Full Code Here

        );

        // Our parser doesn't (yet) support multi-action alters, manually build parameters
        // ALTER TABLE c ADD COLUMN c5 INT, DROP COLUMN c2, ALTER COLUMN c3 SET DATA TYPE char(3)
        TestAISBuilder builder = new TestAISBuilder(typesRegistry());
        builder.table(SCHEMA, "c");
        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");
View Full Code Here

                row(cid, 2, 20),
                row(cid, 3, 30)
        );

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

    public void reportTestCase() throws InvalidOperationException {
        String SCHEMA = "test";
        String TABLE = "t1";
        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);
View Full Code Here

    private static final String SCHEMA = "test";
    private static final String TABLE = "t";

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

    }
   
   
    private Schema caoiSchema() {
        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");
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.