use of org.h2.expression.JavaAggregate in project h2database by h2database.
the class Parser method readJavaAggregate.
private JavaAggregate readJavaAggregate(UserAggregate aggregate) {
ArrayList<Expression> params = New.arrayList();
do {
params.add(readExpression());
} while (readIfMore(true));
Expression filterCondition;
if (readIf("FILTER")) {
read("(");
read("WHERE");
filterCondition = readExpression();
read(")");
} else {
filterCondition = null;
}
Expression[] list = params.toArray(new Expression[0]);
JavaAggregate agg = new JavaAggregate(aggregate, list, currentSelect, filterCondition);
currentSelect.setGroupQuery();
return agg;
}
Aggregations