Examples of akibanInformationSchema()


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

    @Test
    public void dropSqljJar() throws Exception {
        AISBuilder builder = new AISBuilder();
        builder.sqljJar("drop", "grapeJelly", new URL("file://boo.jar"));
        ddl().createSQLJJar(session(), builder.akibanInformationSchema().getSQLJJar("drop", "grapeJelly"));
        builder.sqljJar("keep", "strawberryJam", new URL("file://far.jar"));
        ddl().createSQLJJar(session(), builder.akibanInformationSchema().getSQLJJar("keep", "strawberryJam"));
        expectSqljJars("drop", "grapeJelly");
        expectSqljJars("keep", "strawberryJam");
        ddl().dropSchema(session(), "drop");
View Full Code Here

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

    public void dropSqljJar() throws Exception {
        AISBuilder builder = new AISBuilder();
        builder.sqljJar("drop", "grapeJelly", new URL("file://boo.jar"));
        ddl().createSQLJJar(session(), builder.akibanInformationSchema().getSQLJJar("drop", "grapeJelly"));
        builder.sqljJar("keep", "strawberryJam", new URL("file://far.jar"));
        ddl().createSQLJJar(session(), builder.akibanInformationSchema().getSQLJJar("keep", "strawberryJam"));
        expectSqljJars("drop", "grapeJelly");
        expectSqljJars("keep", "strawberryJam");
        ddl().dropSchema(session(), "drop");
        expectNotSqljJars("drop", "grapeJelly");
        expectSqljJars("keep", "strawberryJam");
View Full Code Here

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

    @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"));
    }

    @Test
    public void testCreateJava() throws Exception {
        executeDDL("CREATE PROCEDURE proca(IN x INT, OUT d DOUBLE) LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA DYNAMIC RESULT SETS 1 EXTERNAL NAME 'ajar:com.acme.Procs.aproc'");
View Full Code Here

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

        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();
    }

    @Test
View Full Code Here

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

        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());
        assertNotNull("Source table should have internal PK", t1_1.getPrimaryKeyIncludingInternal());

        // Serialized AIS did not create an internal column, PK
View Full Code Here

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

        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"));
        assertEquals("v indexed length", INDEXED_LENGTH, table.getIndex("v").getKeyColumns().get(0).getIndexedLength());
    }
View Full Code Here

Examples of com.foundationdb.ais.model.TestAISBuilder.akibanInformationSchema()

        builder.createGroup("state", "schema");
        builder.addTableToGroup("state", "schema", "state");
        builder.groupingIsComplete();
       
        SchemaFactory factory = new SchemaFactory ("schema");
        factory.buildRowDefs(builder.akibanInformationSchema());
        return new Schema(builder.akibanInformationSchema());
    }
}
View Full Code Here

Examples of com.foundationdb.ais.model.TestAISBuilder.akibanInformationSchema()

        builder.addTableToGroup("state", "schema", "state");
        builder.groupingIsComplete();
       
        SchemaFactory factory = new SchemaFactory ("schema");
        factory.buildRowDefs(builder.akibanInformationSchema());
        return new Schema(builder.akibanInformationSchema());
    }
}
View Full Code Here

Examples of com.foundationdb.ais.model.TestAISBuilder.akibanInformationSchema()

        builder.joinColumns("o/i", SCHEMA, O_TABLE, "id", SCHEMA, I_TABLE, "oid");
        builder.addJoinToGroup(O_TABLE, "o/i", 0);
        builder.groupingIsComplete();

        try {
            Table newDef = builder.akibanInformationSchema().getTable(I_NAME);
            runAlter(ChangeLevel.GROUP, I_NAME, newDef, Arrays.asList(TableChange.createModify("oid", "oid")), NO_CHANGES);
            fail("Expected NotNullViolationException");
        } catch(NotNullViolationException e) {
        }
    }
View Full Code Here

Examples of com.foundationdb.ais.model.TestAISBuilder.akibanInformationSchema()

        builder.column(SCHEMA, TABLE, "a", 0, "MCOMPAT", "int", false);
        builder.column(SCHEMA, TABLE, "b", 1, "MCOMPAT", "blob", false);
        builder.column(SCHEMA, TABLE, "c", 2, "MCOMPAT", "mediumblob", false);
        builder.pk(SCHEMA, TABLE);
        builder.indexColumn(SCHEMA, TABLE, Index.PRIMARY, "a", 0, true, null);
        ddl().createTable(session(), builder.akibanInformationSchema().getTable(SCHEMA, TABLE));
        return tableId(SCHEMA, TABLE);
    }
   
    @Test
    public void testBlobs_1() throws Exception {
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.