olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh Reddy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OLINGO-1120) Is grouping in $filter with "(" and ")" possible?
Date Fri, 05 May 2017 14:31:04 GMT

    [ https://issues.apache.org/jira/browse/OLINGO-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998407#comment-15998407
] 

Ramesh Reddy commented on OLINGO-1120:
--------------------------------------

Each grouping operation is presented to you as "visitBinaryOperator", the "left" and "right"
may be further decomposed into inner expressions of grouping.

> 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)

Mime
View raw message