问题
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!
回答1:
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.
来源:https://stackoverflow.com/questions/27818345/does-odata-query-support-nested-filters-with-and-or-operators