Package org.teiid.query.sql.lang

Examples of org.teiid.query.sql.lang.FromClause


        if (obj.hasHint()) {
            append("(");//$NON-NLS-1$
        }

        // left clause
        FromClause leftClause = obj.getLeftClause();
        if (leftClause instanceof JoinPredicate && !((JoinPredicate)leftClause).hasHint()) {
            append("("); //$NON-NLS-1$
            visitNode(leftClause);
            append(")"); //$NON-NLS-1$
        } else {
            visitNode(leftClause);
        }

        // join type
        append(SPACE);
        visitNode(obj.getJoinType());
        append(SPACE);

        // right clause
        FromClause rightClause = obj.getRightClause();
        if (rightClause instanceof JoinPredicate && !((JoinPredicate)rightClause).hasHint()) {
            append("("); //$NON-NLS-1$
            visitNode(rightClause);
            append(")"); //$NON-NLS-1$
        } else {
View Full Code Here


               
        if (from.getClauses().size() != 1) {
            return false;
        }
       
        FromClause clause = from.getClauses().get(0);
       
        if (!(clause instanceof UnaryFromClause)) {
            return false;
        }
       
View Full Code Here

  public static JoinPredicate example(JoinType joinType, String joinOnElement) {
    JoinPredicate jp = new JoinPredicate();

    GroupSymbol g1 = new GroupSymbol("m.g1"); //$NON-NLS-1$
    GroupSymbol g2 = new GroupSymbol("m.g2"); //$NON-NLS-1$
    FromClause lc = new UnaryFromClause(g1);
    FromClause rc = new UnaryFromClause(g2);

    Expression le = new ElementSymbol("m.g1." + joinOnElement); //$NON-NLS-1$
    Expression re = new ElementSymbol("m.g2." + joinOnElement); //$NON-NLS-1$
    Criteria c1 = new CompareCriteria(le, CompareCriteria.EQ, re);
   
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.lang.FromClause

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.