Skip to content

update docs #210

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/filtering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ If you want to filter through relationships you can do that:

When you filter on relationships use "any" operator for "to many" relationships and "has" operator for "to one" relationships.

There is a shortcut to achieve the same filter:
For filters where the nested operator is *eq* (as opposed to *ilike* in the above), a shortcut is available:

.. sourcecode:: http

GET /persons?filter=[{"name":"computers__serial","op":"ilike","val":"%Amstrad%"}] HTTP/1.1
GET /persons?filter=[{"name":"computers__serial","op":"any","val":"Amstrad"}] HTTP/1.1
Accept: application/vnd.api+json

You can also use boolean combination of operations:
Expand All @@ -72,8 +72,8 @@ You can also use boolean combination of operations:
GET /persons?filter=[
{
"name":"computers__serial",
"op":"ilike",
"val":"%Amstrad%"
"op":"any",
"val":"Amstrad"
},
{
"or": [
Expand Down