Package org.teiid.query.sql.lang

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


  }

  /** SELECT a or b from g */
  @Test public void testOrInSelect(){
    Query query = new Query();
    query.setSelect(new Select(Arrays.asList(new ExpressionSymbol("foo", new CompoundCriteria(CompoundCriteria.OR, Arrays.asList(new ExpressionCriteria(new ElementSymbol("a")), new ExpressionCriteria(new ElementSymbol("b"))))))));
    helpTest("select a or b", "SELECT (a) OR (b)", query);
  }
View Full Code Here


      f.setTypeString("CLOB");
      helpTestExpression("xmlserialize(x as CLOB)", "XMLSERIALIZE(x AS CLOB)", f);
    }
   
    @Test public void testExpressionCriteria() throws Exception {
      SearchedCaseExpression sce = new SearchedCaseExpression(Arrays.asList(new ExpressionCriteria(new ElementSymbol("x"))), Arrays.asList(new ElementSymbol("y")));
      helpTestExpression("case when x then y end", "CASE WHEN x THEN y END", sce);
    }
View Full Code Here

      SearchedCaseExpression sce = new SearchedCaseExpression(Arrays.asList(new ExpressionCriteria(new ElementSymbol("x"))), Arrays.asList(new ElementSymbol("y")));
      helpTestExpression("case when x then y end", "CASE WHEN x THEN y END", sce);
    }
   
    @Test public void testExpressionCriteria1() throws Exception {
      SearchedCaseExpression sce = new SearchedCaseExpression(Arrays.asList(new NotCriteria(new ExpressionCriteria(new ElementSymbol("x")))), Arrays.asList(new ElementSymbol("y")));
      helpTestExpression("case when not x then y end", "CASE WHEN NOT (x) THEN y END", sce);
    }
View Full Code Here

TOP

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

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.