docs: using or across embedded resources
This commit is contained in:
@@ -852,6 +852,8 @@ An ``or`` filter can be used for a similar operation:
|
||||
|
||||
curl "http://localhost:3000/films?select=*,roles(*)&roles.or=(character.eq.Gummo,character.eq.Zeppo)"
|
||||
|
||||
However, this only works for columns inside ``roles``. See :ref:`how to use "or" across multiple resources <or_embed_rels>`.
|
||||
|
||||
Limit and offset operations are possible:
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -951,6 +953,18 @@ Both ``is.null`` and ``not.is.null`` can be included inside the `or` operator. F
|
||||
|
||||
curl "http://localhost:3000/films?select=title,actors(*),directors(*)&or=(actors.is.null,directors.is.null)"
|
||||
|
||||
.. _or_embed_rels:
|
||||
|
||||
OR filtering across Embedded Resources
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can also use ``not.is.null`` to make an ``or`` filter across multiple resources.
|
||||
For instance, to show the films whose actors **or** directors are named John:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
curl "http://localhost:3000/films?select=title,actors(),directors()&directors.first_name=eq.John&actors.first_name=eq.John&or=(directors.not.is.null,actors.not.is.null)"
|
||||
|
||||
.. _empty_embed:
|
||||
|
||||
Empty Embed
|
||||
|
||||
Reference in New Issue
Block a user