Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.AISBuilder$NoSuchObjectException


        );

        AkibanInformationSchema ais = aisCloner().clone(ddl().getAIS(session()));
        Table table = ais.getTable(SCHEMA, "c");
        table.removeIndexes(Collections.singleton(table.getIndex("foo")));
        AISBuilder builder = new AISBuilder(ais);
        builder.index(SCHEMA, "c", "foo");
        builder.indexColumn(SCHEMA, "c", "foo", "c2", 0, true, null);

        List<TableChange> changes = new ArrayList<>();
        changes.add(TableChange.createDrop("foo"));
        changes.add(TableChange.createAdd("foo"));
View Full Code Here


        );

        AkibanInformationSchema ais = aisCloner().clone(ddl().getAIS(session()));
        Table table = ais.getTable(SCHEMA, "c");
        table.removeIndexes(Collections.singleton(table.getIndex("foo")));
        AISBuilder builder = new AISBuilder(ais);
        builder.index(SCHEMA, "c", "foo");
        builder.indexColumn(SCHEMA, "c", "foo", "c2", 0, true, null);
        builder.indexColumn(SCHEMA, "c", "foo", "c1", 1, true, null);

        List<TableChange> changes = new ArrayList<>();
        changes.add(TableChange.createModify("foo", "foo"));

        ddl().alterTable(session(), new TableName(SCHEMA, "c"), table, NO_CHANGES, changes, queryContext());
View Full Code Here

        }

        // ActualBuilder interface

        public ActualBuilder(TypesTranslator typesTranslator) {
            this.aisb = new AISBuilder();
            this.typesTranslator = typesTranslator;
            usable = true;
            tablesToGroups = new HashMap<>();
        }
View Full Code Here

public class RoutineDDLIT extends AISDDLITBase {
    @Before
    public void createJar() throws Exception {
        // CALL SQLJ.INSTALL_JAR('foo.jar', 'ajar', 0)
        AISBuilder builder = new AISBuilder();
        builder.sqljJar(SCHEMA_NAME, "ajar", new URL("file://foo.jar"));
        ddl().createSQLJJar(session(), builder.akibanInformationSchema().getSQLJJar(SCHEMA_NAME, "ajar"));
    }
View Full Code Here

    @Before
    public void saveWithExtension() {
        TestStorageFormatExtended.register(testFormatRegistry);

        AISBuilder aisb = new AISBuilder();
        Sequence sequence = aisb.sequence("test", "seq", 0, 1, 0, 1000, true);
        TestStorageDescriptionExtended storageDescription = new TestStorageDescriptionExtended(sequence, identifier);
        storageDescription.setStorageKey("KEY");
        storageDescription.setExtension("PLUS");
        assertTrue(isFullDescription(storageDescription));
        sequence.setStorageDescription(storageDescription);
        ProtobufWriter writer = new ProtobufWriter();
        writer.save(aisb.akibanInformationSchema());
        writer.serialize(bytes);
        bytes.flip();
    }
View Full Code Here

    }

    @Test
    public void dropUniqueMiddleOfGroup() throws StandardException {
        buildCOIJoinedAUnJoined();
        AISBuilder builder2 = new AISBuilder(builder.unvalidatedAIS());
        builder2.unique(SCHEMA, "o", "x");
        builder2.indexColumn(SCHEMA, "o", "x", "o_o", 0, true, null);
        parseAndRun("ALTER TABLE o DROP UNIQUE x");
        expectColumnChanges();
        expectIndexChanges("DROP:x");
        expectFinalTable(O_NAME, "id MCOMPAT_ BIGINT(21) NOT NULL", "cid MCOMPAT_ BIGINT(21) NULL", "o_o MCOMPAT_ BIGINT(21) NULL",
                         "fk1(cid)", "PRIMARY(id)", "join(cid->id)");
View Full Code Here

    private TInstance intType = TestTypesRegistry.MCOMPAT
        .getTypeClass("MCOMPAT", "INT").instance(false);

    @Test (expected=InvalidOperationException.class)
    public void testDuplicateTables() {
        builder = new AISBuilder();
        builder.table("test", "t1");
        builder.column("test", "t1", "c1", 0, intType, true, null, null);
       
        builder.table("test", "t1");
    }
View Full Code Here

        builder.table("test", "t1");
    }

    @Test (expected=InvalidOperationException.class)
    public void testDuplicateColumns() {
        builder = new AISBuilder();
       
        builder.table("test", "t1");
        builder.column("test", "t1", "c1", 0, intType, true, null, null);
        builder.column("test", "t1", "c1", 1, intType, false, null, null);
View Full Code Here

    }
   
    //@Test (expected=InvalidOperationException.class)
    public void testDuplicateColumnPos() {
        builder = new AISBuilder();
       
        builder.table("test", "t1");
        builder.column("test", "t1", "c1", 0, intType, true, null, null);
        builder.column("test", "t1", "c2", 0, intType, false, null, null);
    }
View Full Code Here

        builder.column("test", "t1", "c2", 0, intType, false, null, null);
    }
   
    @Test (expected=InvalidOperationException.class)
    public void testDuplicateIndexes() {
        builder = new AISBuilder();
        builder.table("test", "t1");
        builder.column("test", "t1", "c1", 0, intType, true, null, null);
        builder.column("test", "t1", "c2", 1, intType, false, null, null);
       
        builder.pk("test", "t1");
View Full Code Here

TOP

Related Classes of com.foundationdb.ais.model.AISBuilder$NoSuchObjectException

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.