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

故事扮演 提交于 2019-12-23 09:20:48

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!