Package com.foundationdb.ais.model

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


                throw new UnsupportedSQLException("Unexpected TableElement", tableElement);
            }
        }
        setTableStorage(ddlFunctions, createTable, builder, tableName, table, schemaName);
        builder.basicSchemaIsComplete();
        builder.groupingIsComplete();
        ddlFunctions.createTable(session, table);
    }

    public static void createTable(DDLFunctions ddlFunctions,
                                   Session session,
View Full Code Here


                newColumnName = columnNames.get(colpos);
            }
            addColumn(builder, schemaName, tableName, colpos++, newColumnName,typesTranslator,  descriptor);
        }
        builder.basicSchemaIsComplete();
        builder.groupingIsComplete();
        setTableStorage(ddlFunctions, createTable, builder, tableName, table, schemaName);
        if(createTable.isWithData()) {
            ddlFunctions.createTable(session, table, createTable.getCreateAsQuery().toLowerCase(), context, server);
            return;
        }
View Full Code Here

        nameChanger.doChange();

        // AISTableNameChanger doesn't bother with group names or group tables, fix them with the builder
        AISBuilder builder = new AISBuilder(newAIS);
        builder.basicSchemaIsComplete();
        builder.groupingIsComplete();

        renamingTable(session, currentName, newName);
        final String curSchema = currentName.getSchemaName();
        final String newSchema = newName.getSchemaName();
        final List<String> schemaNames;
View Full Code Here

        builder.createGroup("t1", "test");
        builder.addTableToGroup("t1", "test", "t1");
        builder.joinTables("t2/t1", "test", "t1", "test", "t2");
        builder.joinColumns("t2/t1", "test", "t2", "c1", "test", "t2", "c2");
        builder.addJoinToGroup("t1", "t2/t1", 0);
        builder.groupingIsComplete();
        return builder;
    }
}
View Full Code Here

        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();
        builder.groupingIsComplete();

        // AIS does not have to be validate-able to be serialized (this is how it comes from adapter)
        final AkibanInformationSchema inAIS = builder.akibanInformationSchema();
        final Table t1_1 = inAIS.getTable(SCHEMA, TABLE);
        assertNull("Source table should not have declared PK", t1_1.getPrimaryKey());
View Full Code Here

        builder.index(SCHEMA, TABLE, "v");
        builder.indexColumn(SCHEMA, TABLE, "v", "v", 0, true, INDEXED_LENGTH);
        builder.createGroup(TABLE, SCHEMA);
        builder.addTableToGroup(TABLE, SCHEMA, TABLE);
        builder.basicSchemaIsComplete();
        builder.groupingIsComplete();

        AkibanInformationSchema outAIS = writeAndRead(builder.akibanInformationSchema());
        Table table = outAIS.getTable(SCHEMA, TABLE);
        assertNotNull("found table", table);
        assertNotNull("has v index", table.getIndex("v"));
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.