[
https://issues.apache.org/jira/browse/OLINGO-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15997875#comment-15997875
]
Werner Mueller commented on OLINGO-1120:
----------------------------------------
No there were no parsing errors, I implemented "ExpressionVisitor<Object>" with
the methods listed below.
I was wondering which method could be used for grouping:
public Object visitAlias(String aliasName)
public Object visitBinaryOperator(BinaryOperatorKind operator, Object left,
Object right)
public Object visitEnum(EdmEnumType type, List<String> enumValues)
public Object visitLambdaExpression(String lambdaFunction, String
lambdaVariable, Expression expression)
public Object visitLambdaReference(String variableName)
public Object visitLiteral(Literal literal)
public Object visitMember(Member member)
public Object visitMethodCall(MethodKind methodCall, List<Object> parameters)
public Object visitTypeLiteral(EdmType type)
public Object visitUnaryOperator(UnaryOperatorKind operator, Object operand)
> Is grouping in $filter with "(" and ")" possible?
> --------------------------------------------------
>
> Key: OLINGO-1120
> URL: https://issues.apache.org/jira/browse/OLINGO-1120
> Project: Olingo
> Issue Type: Question
> Components: odata4-server
> Affects Versions: (Java) V4 4.3.0
> Reporter: Werner Mueller
>
> I'm implementing an OData-server-application with Version v4.3.0 of Olingo.
> According to
> https://olingo.apache.org/doc/odata4/tutorials/sqo_f/tutorial_sqo_f.html
> I created an ExpressionVisitor
> to construct a valid JDBC/SQL-where constraint.
> I had a look to
> https://olingo.apache.org/doc/odata2/tutorials/Olingo_Tutorial_AdvancedRead_FilterVisitor.html
> also.
> My problem is with grouping.
> OData states that the Operators "(" and ")" should have the highest
> precedence (5.1.1.9 Operator Precedence,
> http://docs.oasis-open.org/odata/odata/v4.0/os/part2-url-conventions/odata-v4.0-os-part2-url-conventions.html)
> How can I handle grouping with the ExpressionVisitor?
> These are my urls for testing:
> http://localhost:8080/Odata.svc/SomeEnittySet?$filter=(id gt 5 or shortName
> ne 'xxx' or name eq 'test') or (name eq 'xxx' and id lt 567)
> and
> http://localhost:8080/Odata.svc/SomeEnittySet?$filter=(id gt 5 or shortName
> ne 'xxx' or name eq 'test') or name eq 'xxx' and id lt 567
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)