Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does OData query support nested filters with AND/OR operators?

Tags:

odata

Does OData query support nested filters with AND/OR operators?

By nested query, I mean query similar to this:

((FieldA < 50 OR FieldA > 100) AND FieldB == "MyString")

I am building an OData query editor control, so I need to know if these are available.

Thanks!

like image 897
RainCast Avatar asked Jan 07 '15 11:01

RainCast


1 Answers

Yes it does. E.g.:

GET http://services.odata.org/v4/TripPinServiceRW/People?$filter=(FirstName ne 'Mary' and LastName ne 'White') and UserName ne 'marywhite'

You can try it yourself in a browser.

like image 184
Yi Ding - MSFT Avatar answered Sep 22 '22 12:09

Yi Ding - MSFT