Package com.foundationdb.ais.model

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


        }

        TypesTranslator typesTranslator = ddlFunctions.getTypesTranslator();
        AISBuilder builder = new AISBuilder();
        builder.getNameGenerator().mergeAIS(ais);
        builder.table(schemaName, tableName);
        Table table = builder.akibanInformationSchema().getTable(schemaName, tableName);
        IndexNameGenerator namer = DefaultIndexNameGenerator.forTable(table);

        cloneReferencedTables(defaultSchemaName,
                              ddlFunctions.getAISCloner(),
View Full Code Here


            return;
        }

        TypesTranslator typesTranslator = ddlFunctions.getTypesTranslator();
        AISBuilder builder = new AISBuilder();
        builder.table(schemaName, tableName);
        Table table = builder.akibanInformationSchema().getTable(schemaName, tableName);
        ResultColumnList resultColumns = null;
        if(createTable != null)
            resultColumns = createTable.getResultColumns();
        String newColumnName;
View Full Code Here

        builder.groupIndexColumn("t1", "y_y", "test", "t1", "y", 1);
    }

    private AISBuilder createSimpleValidGroup() {
        AISBuilder builder = new AISBuilder();
        builder.table("test", "t1");
        builder.column("test", "t1", "c1", 0, intType, false, null, null);
        builder.column("test", "t1", "x", 1, intType, false, null, null);
        builder.column("test", "t1", "y", 2, intType, false, null, null);
        builder.pk("test", "t1");
        builder.indexColumn("test", "t1", Index.PRIMARY, "c1", 0, true, null);
View Full Code Here

        builder.column("test", "t1", "c1", 0, intType, false, null, null);
        builder.column("test", "t1", "x", 1, intType, false, null, null);
        builder.column("test", "t1", "y", 2, intType, false, null, null);
        builder.pk("test", "t1");
        builder.indexColumn("test", "t1", Index.PRIMARY, "c1", 0, true, null);
        builder.table("test", "t2");
        builder.column("test", "t2", "c1", 0, intType, false, null, null);
        builder.column("test", "t2", "c2", 1, intType, false, null, null);
        builder.column("test", "t2", "y", 2, intType, false, null, null);
        builder.basicSchemaIsComplete();
View Full Code Here

    @Test
    public void tableWithNoDeclaredPK() {
        // CREATE TABLE t1(valid BOOLEAN, state CHAR(2))
        final String TABLE = "t1";
        AISBuilder builder = new AISBuilder();
        builder.table(SCHEMA, TABLE);
        builder.column(SCHEMA, TABLE, "valid", 0, typesRegistry().getTypeClass("MCOMPAT", "TINYINT").instance(true), false, null, null);
        builder.column(SCHEMA, TABLE, "state", 1, typesRegistry().getTypeClass("MCOMPAT", "CHAR").instance(2, true), false, null, null);
        builder.createGroup(TABLE, SCHEMA);
        builder.addTableToGroup(TABLE, SCHEMA, TABLE);
        builder.basicSchemaIsComplete();
View Full Code Here

    @Test
    public void indexColumnIndexedLength() {
        final String TABLE = "t";
        final Integer INDEXED_LENGTH = 16;
        AISBuilder builder = new AISBuilder();
        builder.table(SCHEMA, TABLE);
        builder.column(SCHEMA, TABLE, "v", 0, typesRegistry().getTypeClass("MCOMPAT", "VARCHAR").instance(32, false), false, null, null);
        builder.index(SCHEMA, TABLE, "v");
        builder.indexColumn(SCHEMA, TABLE, "v", "v", 0, true, INDEXED_LENGTH);
        builder.createGroup(TABLE, SCHEMA);
        builder.addTableToGroup(TABLE, SCHEMA, TABLE);
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.