Package org.teiid.language

Examples of org.teiid.language.SearchedWhenClause


    }

    SearchedCase translate(SearchedCaseExpression expr) {
        ArrayList<SearchedWhenClause> whens = new ArrayList<SearchedWhenClause>();
        for (int i = 0; i < expr.getWhenCount(); i++) {
          whens.add(new SearchedWhenClause(translate(expr.getWhenCriteria(i)), translate(expr.getThenExpression(i))));
        }
        return new SearchedCase(whens,
                                      translate(expr.getElseExpression()),
                                      expr.getType());
    }
View Full Code Here


                Arrays.asList(
                    function.getParameters().get(1),
                    new Literal(1, TypeFacility.RUNTIME_TYPES.INTEGER)),
                  TypeFacility.RUNTIME_TYPES.INTEGER)),
        TypeFacility.RUNTIME_TYPES.INTEGER);
    clauses.add(new SearchedWhenClause(new Comparison(length, maxLength, Operator.GT), maxLength));
    Expression defaultExpr = null;
    if (isNegative == null) {
      clauses.add(new SearchedWhenClause(new Comparison(length, new Literal(0, TypeFacility.RUNTIME_TYPES.INTEGER), Operator.GT), length));
    } else if (isNegative) {
      //TODO: could be done in the rewriter
      function.getParameters().set(2, null);
      return null;
    } else {
View Full Code Here

TOP

Related Classes of org.teiid.language.SearchedWhenClause

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.