Package com.foundationdb.ais.model

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


        {
        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);
        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);
        builder.createGroup(table, schema);
        builder.addTableToGroup(table, schema, table);
View Full Code Here

        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);
        builder.createGroup(table, schema);
        builder.addTableToGroup(table, schema, table);
        }
View Full Code Here

        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);
        builder.createGroup(table, schema);
        builder.addTableToGroup(table, schema, table);
        }
View Full Code Here

        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);
        builder.createGroup(table, schema);
        builder.addTableToGroup(table, schema, table);
        }

        {
View Full Code Here

        {
            String schema = "test";
            String table = "parent";
            builder.table(schema, table);
            builder.column(schema, table, "col1", 0, "MCOMPAT", "BIGINT", null, false, null, null);
            builder.pk(schema, table);
            builder.indexColumn(schema, table, Index.PRIMARY, "col1", 0, true, null);
            builder.createGroup(table, schema);
            builder.addTableToGroup(table, schema, table);
           
View Full Code Here

            builder.createGroup(table, schema);
            builder.addTableToGroup(table, schema, table);
           
            table = "child";
            builder.table(schema, table);
            builder.column(schema, table, "col1", 0, "MCOMPAT", "BIGINT", null, false, null, null);
            builder.column(schema, table, "col2", 1, "MCOMPAT", "BIGINT", null, true, null, null);
            builder.pk(schema, table);
            builder.indexColumn(schema, table, Index.PRIMARY, "col1", 0, true, null);
            builder.foreignKey(schema, "child", Arrays.asList("col2"), schema, "parent", Arrays.asList("col1"), ForeignKey.Action.RESTRICT, ForeignKey.Action.RESTRICT, true, true, "fkey_parent");
            builder.createGroup(table, schema);
View Full Code Here

            builder.addTableToGroup(table, schema, table);
           
            table = "child";
            builder.table(schema, table);
            builder.column(schema, table, "col1", 0, "MCOMPAT", "BIGINT", null, false, null, null);
            builder.column(schema, table, "col2", 1, "MCOMPAT", "BIGINT", null, true, null, null);
            builder.pk(schema, table);
            builder.indexColumn(schema, table, Index.PRIMARY, "col1", 0, true, null);
            builder.foreignKey(schema, "child", Arrays.asList("col2"), schema, "parent", Arrays.asList("col1"), ForeignKey.Action.RESTRICT, ForeignKey.Action.RESTRICT, true, true, "fkey_parent");
            builder.createGroup(table, schema);
            builder.addTableToGroup(table, schema, table);
View Full Code Here

        Map<TableName,Collection<String>> refs = new HashMap<>();
        refs.put(TableName.create(schema, "foo"), Arrays.asList("c1", "c2"));
        builder.view(schema, view,
                     "CREATE VIEW voo(c1,c2) AS SELECT c2,c1 FROM foo", new Properties(),
                     refs);
        builder.column(schema, view, "c1", 0, "MCOMPAT", "DOUBLE", true);
        builder.column(schema, view, "c2", 1, "MCOMPAT", "INT", false);
        }

        builder.sqljJar("test", "ajar",
                        new URL("https://example.com/procs/ajar.jar"));
View Full Code Here

        refs.put(TableName.create(schema, "foo"), Arrays.asList("c1", "c2"));
        builder.view(schema, view,
                     "CREATE VIEW voo(c1,c2) AS SELECT c2,c1 FROM foo", new Properties(),
                     refs);
        builder.column(schema, view, "c1", 0, "MCOMPAT", "DOUBLE", true);
        builder.column(schema, view, "c2", 1, "MCOMPAT", "INT", false);
        }

        builder.sqljJar("test", "ajar",
                        new URL("https://example.com/procs/ajar.jar"));
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.