Package com.foundationdb.ais.model

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


        {
        String schema = "test";
        String table = "bar";
        builder.table(schema, table);
        builder.column(schema, table, "col", 0, "MCOMPAT", "BIGINT", false);
        builder.column(schema, table, "name", 1, "MCOMPAT", "INT", false);
        builder.pk(schema, table);
        builder.indexColumn(schema, table, Index.PRIMARY, "col", 0, true, null);
        builder.createGroup(table, schema);

        schema = "test";
View Full Code Here


        schema = "test";
        String childTable = table + "2";
        String indexName = "foo_name";
        builder.table(schema, childTable);
        builder.column(schema, childTable, "foo", 0, "MCOMPAT", "INT", true);
        builder.column(schema, childTable, "pid", 1, "MCOMPAT", "INT", true);

        String joinName = childTable + "/" + table;
        builder.joinTables(joinName, schema, table, schema, childTable);
        builder.joinColumns(joinName, schema, table, "col", schema, childTable, "pid");
View Full Code Here

        schema = "test";
        String childTable = table + "2";
        String indexName = "foo_name";
        builder.table(schema, childTable);
        builder.column(schema, childTable, "foo", 0, "MCOMPAT", "INT", true);
        builder.column(schema, childTable, "pid", 1, "MCOMPAT", "INT", true);

        String joinName = childTable + "/" + table;
        builder.joinTables(joinName, schema, table, schema, childTable);
        builder.joinColumns(joinName, schema, table, "col", schema, childTable, "pid");
        builder.addJoinToGroup(table, joinName, 0);
View Full Code Here

        {
        String schema = "zap";
        String table = "pow";
        String indexName = "name_value";
        builder.table(schema, table);
        builder.column(schema, table, "name", 0, "MCOMPAT", "VARCHAR", 32L, null, true);
        builder.column(schema, table, "value", 1, "MCOMPAT", "DECIMAL", 10L, 2L, true);
        builder.unique(schema, table, indexName);
        builder.indexColumn(schema, table, indexName, "name", 0, true, null);
        builder.indexColumn(schema, table, indexName, "value", 1, true, null);
        builder.createGroup(table, schema);
View Full Code Here

        String schema = "zap";
        String table = "pow";
        String indexName = "name_value";
        builder.table(schema, table);
        builder.column(schema, table, "name", 0, "MCOMPAT", "VARCHAR", 32L, null, true);
        builder.column(schema, table, "value", 1, "MCOMPAT", "DECIMAL", 10L, 2L, true);
        builder.unique(schema, table, indexName);
        builder.indexColumn(schema, table, indexName, "name", 0, true, null);
        builder.indexColumn(schema, table, indexName, "value", 1, true, null);
        builder.createGroup(table, schema);
        builder.addTableToGroup(table, schema, table);
View Full Code Here

        {
        // Added for bug1019905: Last table only had GFK show up in constraints/key_column_usage if it had a GFK
        String schema = "zzz";
        String table = schema + "1";
        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);
        builder.createGroup(table, schema);

        String childTable = schema + "2";
View Full Code Here

        builder.indexColumn(schema, table, Index.PRIMARY, "id", 0, true, null);
        builder.createGroup(table, schema);

        String childTable = schema + "2";
        builder.table(schema, childTable);
        builder.column(schema, childTable, "id", 0, "MCOMPAT", "INT", false);
        builder.column(schema, childTable, "one_id", 1, "MCOMPAT", "INT", true);
        builder.pk(schema, childTable);
        builder.indexColumn(schema, childTable, Index.PRIMARY, "id", 0, true, null);

        String joinName = childTable + "/" + table;
View Full Code Here

        builder.createGroup(table, schema);

        String childTable = schema + "2";
        builder.table(schema, childTable);
        builder.column(schema, childTable, "id", 0, "MCOMPAT", "INT", false);
        builder.column(schema, childTable, "one_id", 1, "MCOMPAT", "INT", true);
        builder.pk(schema, childTable);
        builder.indexColumn(schema, childTable, Index.PRIMARY, "id", 0, true, null);

        String joinName = childTable + "/" + table;
        builder.joinTables(joinName, schema, table, schema, childTable);
View Full Code Here

        builder.sequence(schema, sequence, 1000, -1, 0, 1000, false);
       
        String table = "seq-table";
        sequence = "_col_sequence";
        builder.table(schema, table);
        builder.column(schema, table, "col", 0, "MCOMPAT", "BIGINT", false);
        builder.pk(schema, table);
        builder.indexColumn(schema, table, Index.PRIMARY, "col", 0, true, null);
        builder.sequence(schema, sequence, 1, 1, 0, 1000, false);
        builder.columnAsIdentity(schema, table, "col", sequence, true);
        builder.createGroup(table, schema);
View Full Code Here

       
        {
        String schema = "test";
        String table = "defaults";
        builder.table(schema, table);
        builder.column(schema, table, "col1", 0, "MCOMPAT", "VARCHAR", 10L, null, false, "fred", null);
        builder.column(schema, table, "col2", 1, "MCOMPAT", "VARCHAR", 10L, null, false, "", null);
        builder.column(schema, table, "col3", 2, "MCOMPAT", "BIGINT", null, null, false, "0", null);
        builder.column(schema, table, "col4", 3, "MCOMPAT", "DATE",   null, null, false, null, "current_date");
        builder.column(schema, table, "col5", 4, "MCOMPAT", "DECIMAL", 11L, 2L,  false, "5.5", null);
        builder.column(schema, table, "col6", 5, "MCOMPAT", "VARBINARY", 15L, null, false, null, null);
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.