Package com.foundationdb.qp.memoryadapter

Examples of com.foundationdb.qp.memoryadapter.MemoryTableFactory


    }

    public void finishStorageDescription(HasStorage object, NameGenerator nameGenerator) {
        if (object.getStorageDescription() == null) {
            if (object instanceof Group) {
                MemoryTableFactory factory = memoryTableFactories.get(((Group)object).getName());
                if (factory != null) {
                    object.setStorageDescription(new MemoryTableStorageDescription(object, factory, MemoryTableStorageFormat.identifier));
                }
                else {
                    object.setStorageDescription(getDefaultStorageDescription(object));
View Full Code Here


    @Test
    public void insertFactoryTest() throws Exception {
 
        table = AISBBasedBuilder.create(ddl().getTypesTranslator()).table(TEST_NAME.getSchemaName(),TEST_NAME.getTableName()).colInt("c1").pk("c1").ais().getTable(TEST_NAME);
        MemoryTableFactory factory = new TestFactory (TEST_NAME);

        registerISTable(table, factory);
        Table table = ais().getTable(TEST_NAME);
        assertNotNull (table);
View Full Code Here

    }

    @Test
    public void testGetAdapter() throws Exception {
        table = AISBBasedBuilder.create(ddl().getTypesTranslator()).table(TEST_NAME.getSchemaName(),TEST_NAME.getTableName()).colInt("c1").pk("c1").ais().getTable(TEST_NAME);
        MemoryTableFactory factory = new TestFactory (TEST_NAME);
        registerISTable(table, factory);
        Table newtable = ais().getTable(TEST_NAME);
       
        TestSession sqlSession = new TestSession();
View Full Code Here

    }

    @Test
    public void registerMemoryTableBasic() throws Exception {
        final TableName tableName = new TableName(TableName.INFORMATION_SCHEMA, "test_table");
        MemoryTableFactory factory = new MemoryTableFactoryMock();
        registerISTable(makeSimpleISTable(tableName, ddl().getTypesTranslator()), factory);

        {
            Table testTable = ddl().getAIS(session()).getTable(tableName);
            assertNotNull("New table exists", testTable);
View Full Code Here

    @Test
    public void noDuplicateMemoryTables() throws Exception {
        final TableName tableName = new TableName(TableName.INFORMATION_SCHEMA, "test_table");
        final Table sourceTable = makeSimpleISTable(tableName, ddl().getTypesTranslator());
        MemoryTableFactory factory = new MemoryTableFactoryMock();
        registerISTable(sourceTable, factory);
        try {
            registerISTable(sourceTable, factory);
            fail("Expected DuplicateTableNameException");
        } catch(DuplicateTableNameException e) {
View Full Code Here

    }

    private MemoryTableFactory getFactory(TableName name) {
        Table table = ais.getTable(name);
        assertNotNull("No such table: " + name, table);
        MemoryTableFactory factory = MemoryAdapter.getMemoryTableFactory(table);
        assertNotNull("No factory for table " + name, factory);
        return factory;
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.memoryadapter.MemoryTableFactory

Copyright © 2018 www.massapicom. 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.