Examples of addLiteralSchema()


Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

            "    bar BIGINT NOT NULL,\n" +
            "    PRIMARY KEY (bar)\n" +
            ");";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addPartitionInfo("foo", "bar");
        builder.addProcedures(DelayProc.class);
        builder.setHTTPDPort(8095);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("json.jar"));
        assertTrue(success);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

            "    b VARBINARY(256) DEFAULT NULL,\n" +
            "    PRIMARY KEY (bar)\n" +
            ");";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addPartitionInfo("foo", "bar");
        builder.addStmtProcedure("Insert", "insert into foo values (?, ?);");
        builder.setHTTPDPort(8095);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("json.jar"));
        assertTrue(success);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

        String pathToCatalog = Configuration.getPathToCatalogForTest("csv.jar");
        String pathToDeployment = Configuration.getPathToCatalogForTest("csv.xml");
        VoltProjectBuilder builder = new VoltProjectBuilder();

        builder.addLiteralSchema(
                "create table BLAH ("
                + "clm_integer integer not null, "
                + "clm_tinyint tinyint default 0, "
                + "clm_smallint smallint default 0, "
                + "clm_bigint bigint default 0, "
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

            "ival bigint default 0 not null, " +
            "b varbinary(1) default null, " +
            "PRIMARY KEY(ival));";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addPartitionInfo("blah", "ival");
        builder.addStmtProcedure("Insert", "insert into blah values (?, ?);", null);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("hsqldbbin.jar"), 1, 1, 0);
        assertTrue(success);
        MiscUtils.copyFile(builder.getPathToDeployment(), Configuration.getPathToCatalogForTest("hsqldbbin.xml"));
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

            "bs varbinary(2) default null," +
            "PRIMARY KEY(ival));\n" +
            "create index idx on blah (ival,s);";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addPartitionInfo("blah", "ival");
        builder.addStmtProcedure("Insert", "insert into blah values (?, ?, ?, ?);", null);
        builder.addStmtProcedure("Select", "select * from blah;", null);
        builder.addStmtProcedure("Update", "update blah set b = ? where ival = ?", null);
        builder.addStmtProcedure("FindString", "select * from blah where ival = ? and s = ?", null);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

            "b varbinary(256) default null, " +
            "PRIMARY KEY(ival));\n" +
            "create index idx on blah (ival,b);";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addPartitionInfo("blah", "ival");
        builder.addStmtProcedure("Insert", "insert into blah values (?, ?);", null);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("binarytest.jar"), 1, 1, 0);
        assertFalse(success);
    }
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

            "b varbinary(256) default null, " +
            "s varchar(256) default null, " +
            "PRIMARY KEY(ival));";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addProcedures(BigFatBlobAndStringMD5.class);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("bigfatblobs.jar"), 1, 1, 0);
        assertTrue("Failed to compile catalog", success);
        MiscUtils.copyFile(builder.getPathToDeployment(), Configuration.getPathToCatalogForTest("bigfatblobs.xml"));
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

    public void testAdminStartupChange() throws IOException {
        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, C2 BIGINT NOT NULL);");
        builder.addPartitionInfo("A", "C1");
        builder.compile(testDir + File.separator + "adminstartup1.jar",
                1, 1, 0, 1000, true);
        Catalog catOriginal = catalogForJar(testDir + File.separator + "adminstartup1.jar");
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

public class Runner extends TestCase {

    public static void main(String[] args) throws Exception {
        // compile the catalog
        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addLiteralSchema("create table items (id bigint not null, created bigint not null, primary key (id));");
        project.addLiteralSchema("create index idx_item_tree on items (created, id);");

        project.addStmtProcedure("CreateItem",
                                 "insert into items (id, created) values (?,?);",
                                 "items.id:0");
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addLiteralSchema()

    public static void main(String[] args) throws Exception {
        // compile the catalog
        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addLiteralSchema("create table items (id bigint not null, created bigint not null, primary key (id));");
        project.addLiteralSchema("create index idx_item_tree on items (created, id);");

        project.addStmtProcedure("CreateItem",
                                 "insert into items (id, created) values (?,?);",
                                 "items.id:0");
        project.addStmtProcedure("GetItems",
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.