Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert wrap in parenthesis (grouping) to an operator? #15

Open
jgornick opened this issue Apr 19, 2018 · 3 comments
Open

Convert wrap in parenthesis (grouping) to an operator? #15

jgornick opened this issue Apr 19, 2018 · 3 comments

Comments

@jgornick
Copy link

I've created an example at https://stackblitz.com/edit/odata-parser-s38vfw

Notice how each of the operators are being wrapped in parenthesis. What I was expecting is a query that looks like:

foo eq 'bar' and quux eq 'baz' and name ne 'bax'

Parenthesis are a "grouping operator" according to the OData specification. Should they be treated as such in the filter builder?

For example, update the filter builder library to specify where they want to group. Another reason to allow grouping as an operator is some implementations of the OData specification don't support the grouping operator.

Right now the filter builder is producing OData strings implying that all implementations support the grouping operator.

Thoughts?

@bodia-uz
Copy link
Owner

bodia-uz commented Jul 11, 2018

You are right, the parenthesis is not required in most of the cases.
It was added because its easier to add them, then check if the rule is safe.

We need to get rid of them and add them only when required, but unfortunately, I don't have a time for that now:|

@jgornick
Copy link
Author

I am looking to dedicate time soon to close off some loose ends on open source projects. This project is at the top of my list 😄

Thanks again!

@bodia-uz
Copy link
Owner

Cool. It would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants