Package org.teiid.language

Examples of org.teiid.language.Join


        assertEquals(Join.JoinType.LEFT_OUTER_JOIN, example(JoinType.JOIN_LEFT_OUTER).getJoinType());
        assertEquals(Join.JoinType.RIGHT_OUTER_JOIN, example(JoinType.JOIN_RIGHT_OUTER).getJoinType());
    }

    public void testGetCriteria() throws Exception {
        Join join = example(JoinType.JOIN_INNER);
        assertTrue(join.getCondition() instanceof Comparison);
    }
View Full Code Here


            joinType = Join.JoinType.FULL_OUTER_JOIN;
        } else if(join.getJoinType().equals(JoinType.JOIN_CROSS)) {
            joinType = Join.JoinType.CROSS_JOIN;
        }
       
        return new Join(translate(join.getLeftClause()),
                            translate(join.getRightClause()),
                            joinType,
                            translate(crit));
    }
View Full Code Here

    return super.translate(obj, context);
  }

  public static void convertCrossJoinToInner(LanguageObject obj, LanguageFactory lf) {
    if (obj instanceof Join) {
      Join join = (Join)obj;
      if (join.getJoinType() == JoinType.CROSS_JOIN) {
        Literal one = lf.createLiteral(1, TypeFacility.RUNTIME_TYPES.INTEGER);
        join.setCondition(lf.createCompareCriteria(Operator.EQ, one, one));
        join.setJoinType(JoinType.INNER_JOIN);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.teiid.language.Join

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.