Examples of addClause()


Examples of org.teiid.query.sql.lang.From.addClause()

        query.setSelect(select);
        From from = new From();
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        ufc.setOptional(true);
        from.addClause(ufc);
        from.addGroup(new GroupSymbol("t2")); //$NON-NLS-1$
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT * FROM /*+ optional */ t1, t2", query);         //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        query.setSelect(select);
        From from = new From();
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        ufc.setOptional(true);
        from.addClause(ufc);
        from.addGroup(new GroupSymbol("t2")); //$NON-NLS-1$
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT * FROM /*+ optional */ t1, t2", query);         //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        query.setSelect(select);
        From from = new From();
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        ufc.setOptional(true);
        from.addClause(ufc);
        from.addGroup(new GroupSymbol("t2")); //$NON-NLS-1$
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT * FROM /*+ optional */ t1, t2", query);         //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        From from = new From();
        from.addGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("t2")); //$NON-NLS-1$
        ufc.setOptional(true);
        from.addClause(ufc);
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT * FROM t1, /*+ optional */ t2", query);         //$NON-NLS-1$
    }

View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        query.setSelect(select);
        From from = new From();
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("a", "t1")); //$NON-NLS-1$ //$NON-NLS-2$
        ufc.setOptional(true);
        from.addClause(ufc);
        from.addGroup(new GroupSymbol("t2")); //$NON-NLS-1$
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT * FROM /*+ optional */ t1 AS a, t2", query);         //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        From from = new From();
        from.addGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("a", "t2")); //$NON-NLS-1$ //$NON-NLS-2$
        ufc.setOptional(true);
        from.addClause(ufc);
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT * FROM t1, /*+ optional */ t2 AS a", query);         //$NON-NLS-1$
    }
   
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        JoinPredicate joinPredicate = new JoinPredicate(ufc, ufc2, JoinType.JOIN_INNER, criteria);
        joinPredicate.setOptional(true);

        UnaryFromClause ufc3 = new UnaryFromClause();
        ufc3.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        from.addClause(ufc3);
        from.addClause(joinPredicate);
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT b FROM t1, /*+ optional */ (t2 INNER JOIN t3 ON t2.a = t3.a)", query);         //$NON-NLS-1$
    }
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        joinPredicate.setOptional(true);

        UnaryFromClause ufc3 = new UnaryFromClause();
        ufc3.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
        from.addClause(ufc3);
        from.addClause(joinPredicate);
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT b FROM t1, /*+ optional */ (t2 INNER JOIN t3 ON t2.a = t3.a)", query);         //$NON-NLS-1$
    }

View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        criteria = new ArrayList();
        criteria.add(new CompareCriteria(new ElementSymbol("t1.a"), AbstractCompareCriteria.EQ, new ElementSymbol("t3.a")));//$NON-NLS-1$//$NON-NLS-2$
        JoinPredicate joinPredicate2 = new JoinPredicate(joinPredicate, ufc3, JoinType.JOIN_LEFT_OUTER, criteria);

        from.addClause(joinPredicate2);
        query.setFrom(from);          

        TestParser.helpTest(sql, "SELECT b FROM (t1 LEFT OUTER JOIN /*+ optional */ t2 ON t1.a = t2.a) LEFT OUTER JOIN /*+ optional */ t3 ON t1.a = t3.a", query);         //$NON-NLS-1$
    }
   
View Full Code Here

Examples of org.teiid.query.sql.lang.From.addClause()

        elseQuery.setSelect(elseSelect);
        From elseFrom = (From)from.clone();
        UnaryFromClause ufc = new UnaryFromClause();
        ufc.setGroup(new GroupSymbol("h")); //$NON-NLS-1$
        ufc.setOptional(true);
        elseFrom.addClause(ufc);
        elseQuery.setFrom(elseFrom);
        elseQuery.setCriteria(criteria);
       
        AssignmentStatement elseQueryStmt = new AssignmentStatement(var2, elseQuery);
       
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.