Package org.voltdb.compiler

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


        return getCatalogForTable(tableName, catname, t, true);
    }

    private Catalog getCatalogForTable(String tableName, String catname, VoltTable t, boolean export) throws IOException {
        CatalogBuilder builder = new CatalogBuilder();
        builder.addLiteralSchema(TableHelper.ddlForTable(t));
        if (export) {
            builder.addLiteralSchema("EXPORT TABLE " + TableHelper.getTableName(t) + ";");
        }

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
View Full Code Here


    private Catalog getCatalogForTable(String tableName, String catname, VoltTable t, boolean export) throws IOException {
        CatalogBuilder builder = new CatalogBuilder();
        builder.addLiteralSchema(TableHelper.ddlForTable(t));
        if (export) {
            builder.addLiteralSchema("EXPORT TABLE " + TableHelper.getTableName(t) + ";");
        }

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        builder.compile(testDir + File.separator + "test-" + catname + ".jar");
        Catalog cat = catalogForJar(testDir + File.separator + "test-" + catname + ".jar");
View Full Code Here

     * that table on disk.
     */
    String catalogPathForTable(VoltTable t, String jarname) throws IOException {
        CatalogBuilder builder = new CatalogBuilder();
        String ddl = TableHelper.ddlForTable(t);
        builder.addLiteralSchema(ddl);
        String retval = Configuration.getPathToCatalogForTest(jarname);
        boolean success = builder.compile(retval);
        // good spot below for a breakpoint if compiling fails
        if (!success) {
            fail();
View Full Code Here

        }
        else {
            log.info("New View: NULL");
        }

        builder.addLiteralSchema(TableHelper.ddlForTable(t2));
        if (view != null) {
            builder.addLiteralSchema(view.ddlForView());
        }
        builder.addLiteralSchema(TableHelper.ddlForTable(versionT));
        // make tables name A partitioned and tables named B replicated
View Full Code Here

            log.info("New View: NULL");
        }

        builder.addLiteralSchema(TableHelper.ddlForTable(t2));
        if (view != null) {
            builder.addLiteralSchema(view.ddlForView());
        }
        builder.addLiteralSchema(TableHelper.ddlForTable(versionT));
        // make tables name A partitioned and tables named B replicated
        if (newName.equalsIgnoreCase("A")) {
            int pkeyIndex = TableHelper.getBigintPrimaryKeyIndexIfExists(t2);
View Full Code Here

        builder.addLiteralSchema(TableHelper.ddlForTable(t2));
        if (view != null) {
            builder.addLiteralSchema(view.ddlForView());
        }
        builder.addLiteralSchema(TableHelper.ddlForTable(versionT));
        // make tables name A partitioned and tables named B replicated
        if (newName.equalsIgnoreCase("A")) {
            int pkeyIndex = TableHelper.getBigintPrimaryKeyIndexIfExists(t2);
            builder.addPartitionInfo(newName, t2.getColumnName(pkeyIndex));
            builder.addProcedures(VerifySchemaChangedA.class);
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.