Examples of HSQLInterface


Examples of org.hsqldb.HSQLInterface

            "\"w_zip\" varchar(9) default NULL, " +
            "\"w_tax\" float default NULL, " +
            "PRIMARY KEY  (\"w_id\") " +
            ");";

        HSQLInterface hsql = HSQLInterface.loadHsqldb();

        hsql.runDDLCommand(ddl1);

        String xml = hsql.getXMLFromCatalog();
        System.out.println(xml);
        assertTrue(xml != null);

        hsql.close();
    }
View Full Code Here

Examples of org.hsqldb.HSQLInterface

        String line;
        while ((line = br.readLine()) != null) {
            ddl1 += line + "\n";
        }

        HSQLInterface hsql = HSQLInterface.loadHsqldb();

        hsql.runDDLCommand(ddl1);

        String xml = hsql.getXMLFromCatalog();
        System.out.println(xml);
        assertTrue(xml != null);

        hsql.close();
    }
View Full Code Here

Examples of org.hsqldb.HSQLInterface

public abstract class CompilerUtil {

    public static AbstractPlanNode compileSQL(final Procedure catalog_proc, String name, String sql) throws Exception {
        VoltCompiler compiler = new VoltCompiler();
        HSQLInterface hsql = HSQLInterface.loadHsqldb();

        Database catalog_db = (Database) catalog_proc.getParent();
        Catalog catalog = catalog_db.getCatalog();
        Statement catalog_stmt = catalog_proc.getStatements().add(name);
View Full Code Here

Examples of org.hsqldb.HSQLInterface

     * @return
     * @throws Exception
     */
    public static Catalog compileCatalog(String schema_file) throws Exception {

        HSQLInterface hzsql = HSQLInterface.loadHsqldb();
        String xmlSchema = null;
        hzsql.runDDLFile(schema_file);
        xmlSchema = hzsql.getXMLFromCatalog(true);

        //
        // Setup fake database connection. Pass stuff to database to get catalog
        // objects
        //
View Full Code Here

Examples of org.hsqldb.HSQLInterface

        //////////////////////
        // LOAD HSQL
        //////////////////////

        log("creating HSQLInterface");
        HSQLInterface hsql = HSQLInterface.loadHsqldb();
        String hexDDL = db.getSchema();
        String ddl = Encoder.hexDecodeToString(hexDDL);
        String[] commands = ddl.split(";");
        for (String command : commands) {
            command = command.trim();
            if (command.length() == 0)
                continue;
            try {
                hsql.runDDLCommand(command);
            } catch (HSQLParseException e) {
                // need a good error message here
                log("Error creating hsql: " + e.getMessage());
                System.exit(82);
            }
View Full Code Here

Examples of org.hsqldb_voltpatches.HSQLInterface

            "\"w_zip\" varchar(9) default NULL, " +
            "\"w_tax\" float default NULL, " +
            "PRIMARY KEY  (\"w_id\") " +
            ");";

        HSQLInterface hsql = HSQLInterface.loadHsqldb();

        hsql.runDDLCommand(ddl1);

        VoltXMLElement xml = hsql.getXMLFromCatalog();
        System.out.println(xml);
        assertTrue(xml != null);

    }
View Full Code Here

Examples of org.hsqldb_voltpatches.HSQLInterface

        String ddl1 =
            "CREATE TABLE \"warehouse\" ( " +
            "\"w_street_1\" char(32) default NULL, " +
            ");";

        HSQLInterface hsql = HSQLInterface.loadHsqldb();
        try {
            hsql.runDDLCommand(ddl1);
        }
        catch (HSQLParseException e) {
            assertTrue(true);
            return;
        }
View Full Code Here

Examples of org.hsqldb_voltpatches.HSQLInterface

        while ((line = br.readLine()) != null) {
            ddl1 += line + "\n";
        }

        br.close();
        HSQLInterface hsql = HSQLInterface.loadHsqldb();

        hsql.runDDLCommand(ddl1);

        VoltXMLElement xml = hsql.getXMLFromCatalog();
        System.out.println(xml);
        assertTrue(xml != null);

    }
View Full Code Here

Examples of org.hsqldb_voltpatches.HSQLInterface

    //
    // Changes in HSQL's ParserDQL and ParserBase make this more consistent
    //
    public void testENG_912() throws HSQLParseException {
        String schema = "create table tmc (name varchar(32), user varchar(32), primary key (name, user));";
        HSQLInterface hsql = HSQLInterface.loadHsqldb();

        hsql.runDDLCommand(schema);
        VoltXMLElement xml = hsql.getXMLFromCatalog();
        System.out.println(xml);
        assertTrue(xml != null);

    }
View Full Code Here

Examples of org.hsqldb_voltpatches.HSQLInterface

    // Before fixing ENG-2345, the VIEW definition wouldn't compile if it were
    // containing single quote characters.
    //
    public void testENG_2345() throws HSQLParseException {
        String table = "create table tmc (name varchar(32), user varchar(32), primary key (name, user));";
        HSQLInterface hsql = HSQLInterface.loadHsqldb();
        hsql.runDDLCommand(table);

        String view = "create view v (name , user ) as select name , user from tmc where name = 'name';";
        hsql.runDDLCommand(view);

        VoltXMLElement xml = hsql.getXMLFromCatalog();
        System.out.println(xml);
        assertTrue(xml != null);

    }
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.