add empty embed filter
This commit is contained in:
committed by
Steve Chavez
parent
7832ddba52
commit
8ae6b012f4
@@ -418,8 +418,8 @@ The result will show the nested actors named Tom and order them by last name. Al
|
||||
|
||||
.. _embedding_top_level_filter:
|
||||
|
||||
Embedding with Top-level Filtering
|
||||
----------------------------------
|
||||
Top-level Filtering
|
||||
-------------------
|
||||
|
||||
By default, :ref:`embed_filters` don't change the top-level resource(``films``) rows at all:
|
||||
|
||||
@@ -481,6 +481,30 @@ In order to filter the top level rows you need to add ``!inner`` to the embedded
|
||||
}
|
||||
]
|
||||
|
||||
.. _empty_embed_filter:
|
||||
|
||||
Empty Embed Filter
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to filter the films by actors but don't want to include them in the response, empty the embedded columns.
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: http
|
||||
|
||||
GET /films?select=title,actors!inner()&actors.first_name=eq.Jehanne HTTP/1.1
|
||||
|
||||
.. code-tab:: bash Curl
|
||||
|
||||
curl "http://localhost:3000/films?select=title,actors!inner()&actors.first_name=eq.Jehanne"
|
||||
|
||||
.. code-block:: json
|
||||
[
|
||||
{
|
||||
"title": "The Haunted Castle",
|
||||
}
|
||||
]
|
||||
|
||||
.. _embedding_partitioned_tables:
|
||||
|
||||
Embedding Partitioned Tables
|
||||
|
||||
@@ -10,6 +10,11 @@ Horizontal Filtering
|
||||
- New ``isdistinct`` :ref:`operator <operators>`. It is a direct translation of `IS DINTINCT FROM <https://www.postgresql.org/docs/current/functions-comparison.html#FUNCTIONS-COMPARISON-PRED-TABLE>`_.
|
||||
- New ``and/all`` :ref:`modifiers`.
|
||||
|
||||
Resource Embedding
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- New :ref:`empty_embed_filter`.
|
||||
|
||||
OpenAPI
|
||||
~~~~~~~
|
||||
|
||||
@@ -38,6 +43,7 @@ Breaking changes
|
||||
|
||||
- Removed Bulk Call with ``Prefer: params=multiple-objects`` on Stored Procedures.
|
||||
- To comply with `RFC 9110 <https://www.rfc-editor.org/rfc/rfc9110.html#name-range>`_, the Range header is now only considered on GET.
|
||||
|
||||
+ Other methods will ignore it and instead should use the ``limit/offset``.
|
||||
+ PUT requests no longer return an error when this header is present (using limit/offset still triggers the error)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user