use of io.requery.query.RowExpression in project requery by requery.
the class DefaultOutput method appendColumnExpression.
private void appendColumnExpression(Expression expression) {
switch(expression.getExpressionType()) {
case ATTRIBUTE:
Attribute attribute = (Attribute) expression;
qb.attribute(attribute);
break;
default:
if (expression instanceof RowExpression) {
RowExpression collection = (RowExpression) expression;
qb.openParenthesis();
qb.commaSeparated(collection.getExpressions(), new QueryBuilder.Appender<Expression<?>>() {
@Override
public void append(QueryBuilder qb, Expression<?> value) {
appendColumnForSelect(value);
}
});
qb.closeParenthesis().space();
} else {
qb.append(expression.getName()).space();
}
break;
}
}
Aggregations