Examples of NewTableBuilder


Examples of com.foundationdb.ais.model.aisb2.NewTableBuilder

public class PrimaryKeyParserTest {
    private static Index createIndex(int colCount, boolean binary) {
        NewAISBuilder builder = AISBBasedBuilder.create("test",
                                                        MTypesTranslator.INSTANCE);
        String[] colNames = new String[colCount];
        NewTableBuilder table = builder.table("t");
        char colName = 'a';
        for(int i = 0; i < colCount; ++i) {
            colNames[i] = String.valueOf(colName++);
            if (binary) {
                table.colVarBinary(colNames[i], 16, false);
            }
            else {
                table.colInt(colNames[i], false);
            }
        }
        table.pk(colNames);
        return builder.ais(true).getTable("test", "t").getPrimaryKey().getIndex();
    }
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewTableBuilder

    }

    public RowDataFormatTest(TableMaker tableMaker, Object[] fields, String bytesString) {
        TypesTranslator typesTranslator = MTypesTranslator.INSTANCE;
        NewAISBuilder aisBuilder = AISBBasedBuilder.create(SCHEMA, typesTranslator);
        NewTableBuilder tableBuilder = aisBuilder.table(TABLE).colInt("pkid");
        tableMaker.make(tableBuilder);
        tableBuilder.pk("pkid");
        AkibanInformationSchema ais = aisBuilder.ais();
        Table table = ais.getTable(SCHEMA, TABLE);
        table.setTableId(1);
        new SchemaFactory().buildRowDefs(ais);
        rowDef = ais.getTable(SCHEMA, TABLE).rowDef();
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.