add top-level ordering

This commit is contained in:
steve-chavez
2023-05-11 01:37:50 -03:00
committed by Steve Chavez
parent 8ae6b012f4
commit d15dc680af
2 changed files with 20 additions and 0 deletions
@@ -505,6 +505,25 @@ If you want to filter the films by actors but don't want to include them in the
}
]
.. _top_level_order:
Top-level Ordering
------------------
On :ref:`Many-to-One <many-to-one>` and :ref:`One-to-One <one-to-one>` relationships, you can use a column of the "to-one" end to sort the top-level.
For example, to arrange the films in descending order using the director's last name.
.. tabs::
.. code-tab:: http
GET /films?select=title,directors(last_name)&order=directors(last_name).desc HTTP/1.1
.. code-tab:: bash Curl
curl "http://localhost:3000/films?select=title,directors(last_name)&order=directors(last_name).desc"
.. _embedding_partitioned_tables:
Embedding Partitioned Tables