Examples of ais()


Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

    @Test
    public void autoIncrementInsertTest() throws Exception {
        NewAISBuilder builder = AISBBasedBuilder.create("test", ddl().getTypesTranslator());
        builder.table("A").autoIncInt("I", 1).colString("V", 255).pk("I");
        ddl().createTable(session(), builder.ais().getTable("test", "A"));

        int tableId = tableId("test", "A");
        for (int i = 1; i <= ROW_COUNT; i++) {
            writeRows(row(tableId, i, "This is record # " + 1));
        }
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

public class TableIDCollisionIT extends ITBase {
    private Table simpleISTable() {
        final TableName FAKE_TABLE = new TableName(TableName.INFORMATION_SCHEMA, "fake_table");
        NewAISBuilder builder = AISBBasedBuilder.create(ddl().getTypesTranslator());
        builder.table(FAKE_TABLE).colInt("id").pk("id");
        Table table = builder.ais().getTable(FAKE_TABLE);
        assertNotNull("Found table", table);
        return table;
    }

    @Override
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

     */
    @Test
    public void dropThenCreateRowDefIDRecycled() throws InvalidOperationException {
        NewAISBuilder builder = AISBBasedBuilder.create("test", ddl().getTypesTranslator());
        builder.table("t1").autoIncInt("id", 1).pk("id").colString("name", 255);
        ddl().createTable(session(), builder.ais().getTable("test", "t1"));
        final int tidV1 = tableId("test", "t1");

        writeRow(tidV1, 1, "hello world");
        expectRowCount(tidV1, 1);
        ddl().dropTable(session(), tableName(tidV1));
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

    @Test(expected=UndeclaredColumnChangeException.class)
    public void unspecifiedColumnChange() {
        NewAISBuilder builder = AISBBasedBuilder.create(ddl().getTypesTranslator());
        builder.table(SCHEMA, "c").colInt("c1").pk("c1");
        Table table = builder.ais().getTable(SCHEMA, "c");

        ddl().createTable(session(),  table);

        builder = AISBBasedBuilder.create(ddl().getTypesTranslator());
        builder.table(SCHEMA, "c").colInt("c1").colInt("c2").colInt("c3").pk("c1");
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

    }

    private static Table makeSimpleISTable(TableName name, TypesTranslator typesTranslator) {
        NewAISBuilder builder = AISBBasedBuilder.create(name.getSchemaName(), typesTranslator);
        builder.table(name.getTableName()).colInt("id", false).pk("id");
        return builder.ais().getTable(name);
    }

    private static class MemoryTableFactoryMock implements MemoryTableFactory {
        @Override
        public TableName getName() {
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

        builder.procedure(RESET)
        .language("java", Routine.CallingConvention.JAVA)
        .paramStringIn("tap_names", 128)
        .externalName(Routines.class.getName(), "resetTaps");
       
        return builder.ais(true);
    }
   
    private final ConfigurationService config;
    private final SchemaManager schemaManager;
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

                .colBigInt("load_count", false)
                .colBigInt("map_size", false)
                .colBigInt("outstanding_count", false)
                .colBigInt("task_queue_size", false);

        AkibanInformationSchema ais = builder.ais();
        Table table = ais.getTable(factory.getName());
        registerMemoryInformationSchemaTable(table, factory);
    }

    @Override
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

        NewAISBuilder aisb = AISBBasedBuilder.create(schemaManager.getTypesTranslator());
        aisb.procedure(TableName.SYS_SCHEMA, "persistitcli")
            .language("java", Routine.CallingConvention.LOADABLE_PLAN)
            .paramStringIn("command", 1024)
            .externalName(PersistitCLILoadablePlan.class.getCanonicalName());
        for(Routine proc : aisb.ais().getRoutines().values()) {
            schemaManager.registerSystemRoutine(proc);
        }
    }

    @Override
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

        protected abstract void buildTable(NewTableBuilder builder);

        public Table table(TypesTranslator typesTranslator) {
            NewAISBuilder builder = AISBBasedBuilder.create(typesTranslator);
            buildTable(builder.table(getName()));
            return builder.ais(false).getTable(getName());
        }

        protected MemTableBase(TableName tableName) {
            super(tableName);
        }
View Full Code Here

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.ais()

            else {
                table.colInt(colNames[i], false);
            }
        }
        table.pk(colNames);
        return builder.ais(true).getTable("test", "t").getPrimaryKey().getIndex();
    }

    private static void test(String input, Index pk, List<List<Object>> expected) {
        List<List<Object>> actual = PrimaryKeyParser.parsePrimaryKeys(input, pk);
        assertEquals(expected, actual);
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.