Search in sources :

Example 1 with NamedExpression

use of org.apache.qpid.server.filter.NamedExpression in project qpid-broker-j by apache.

the class ConfiguredObjectFilterParser method selectClauseElement.

public final Map<String, Expression> selectClauseElement() throws ParseException {
    String name = null;
    Expression expr;
    expr = addExpression();
    switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case AS:
            jj_consume_token(AS);
            name = identifier();
            break;
        default:
            ;
    }
    if (name == null) {
        name = (expr instanceof NamedExpression) ? ((NamedExpression) expr).getName() : "";
    }
    {
        if (true)
            return Collections.singletonMap(name, expr);
    }
    throw new Error("Missing return statement in function");
}
Also used : ArithmeticExpression(org.apache.qpid.server.filter.ArithmeticExpression) NamedExpression(org.apache.qpid.server.filter.NamedExpression) ComparisonExpression(org.apache.qpid.server.filter.ComparisonExpression) LogicExpression(org.apache.qpid.server.filter.LogicExpression) OrderByExpression(org.apache.qpid.server.filter.OrderByExpression) UnaryExpression(org.apache.qpid.server.filter.UnaryExpression) ConstantExpression(org.apache.qpid.server.filter.ConstantExpression) Expression(org.apache.qpid.server.filter.Expression) BooleanExpression(org.apache.qpid.server.filter.BooleanExpression) NamedExpression(org.apache.qpid.server.filter.NamedExpression)

Aggregations

ArithmeticExpression (org.apache.qpid.server.filter.ArithmeticExpression)1 BooleanExpression (org.apache.qpid.server.filter.BooleanExpression)1 ComparisonExpression (org.apache.qpid.server.filter.ComparisonExpression)1 ConstantExpression (org.apache.qpid.server.filter.ConstantExpression)1 Expression (org.apache.qpid.server.filter.Expression)1 LogicExpression (org.apache.qpid.server.filter.LogicExpression)1 NamedExpression (org.apache.qpid.server.filter.NamedExpression)1 OrderByExpression (org.apache.qpid.server.filter.OrderByExpression)1 UnaryExpression (org.apache.qpid.server.filter.UnaryExpression)1