Package org.ofbiz.sql

Examples of org.ofbiz.sql.Parser


    public SQLTest(String name) {
        super(name);
    }

    private static Parser parser(SQLStatement<?> s) throws Exception {
        return new Parser(new StringReader(s.toString()));
    }
View Full Code Here


    private static Parser parser(SQLStatement<?> s) throws Exception {
        return new Parser(new StringReader(s.toString()));
    }

    public void testParse() throws Exception {
        List<SQLStatement<?>> statements = new Parser(getClass().getResourceAsStream("GoodParseAll.sql")).SQLFile();
        for (SQLStatement<?> statement: statements) {
            System.err.println(statement);
        }
        Iterator<SQLStatement<?>> stmtIt = statements.iterator();
        assertTrue("has more statements", stmtIt.hasNext());
View Full Code Here

    public SelectTest(String name) {
        super(name);
    }

    private static Parser parser(Object v) {
        return new Parser(new StringReader(v.toString()));
    }
View Full Code Here

    private static Parser updateParserFlags(Parser parser) {
        return parser.deleteSupportsUsing(false).updateSupportsFrom(false);
    }

    public static EntitySelectPlan parseSelect(String sql) throws ParseException {
       return planner.planSelect(updateParserFlags(new Parser(new StringReader(sql))).SelectStatement());
    }
View Full Code Here

    public static EntitySelectPlan parseSelect(String sql) throws ParseException {
       return planner.planSelect(updateParserFlags(new Parser(new StringReader(sql))).SelectStatement());
    }

    public static OrderByItem parseOrderByItem(String sql) throws ParseException {
       return updateParserFlags(new Parser(new StringReader(sql))).OrderByItem();
    }
View Full Code Here

    private static Parser updateParserFlags(Parser parser) {
        return parser.deleteSupportsUsing(false).updateSupportsFrom(false);
    }

    public static EntitySelectPlan parseSelect(String sql) throws ParseException {
       return planner.planSelect(updateParserFlags(new Parser(new StringReader(sql))).SelectStatement());
    }
View Full Code Here

    public SQLTest(String name) {
        super(name);
    }

    public void testParse() throws Exception {
        List<SQLStatement<?>> statements = new Parser(getClass().getResourceAsStream("GoodParseAll.sql")).SQLFile();
        for (SQLStatement<?> statement: statements) {
            System.err.println(statement);
        }
        Iterator<SQLStatement<?>> stmtIt = statements.iterator();
        assertTrue("has more statements", stmtIt.hasNext());
View Full Code Here

TOP

Related Classes of org.ofbiz.sql.Parser

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.