use of org.teiid.query.sql.symbol.SearchedCaseExpression in project teiid by teiid.
the class ODataExpressionToSQLVisitor method addOne.
private org.teiid.query.sql.symbol.Expression addOne(org.teiid.query.sql.symbol.Expression expr) {
org.teiid.query.sql.symbol.Expression when = new CompareCriteria(expr, CompareCriteria.LT, new Constant(0));
SearchedCaseExpression caseExpr = new SearchedCaseExpression(Arrays.asList(when), Arrays.asList(expr));
caseExpr.setElseExpression(new Function("+", new org.teiid.query.sql.symbol.Expression[] { expr, new Constant(1) }));
return caseExpr;
}
Aggregations