diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-19 11:45:09 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-19 11:45:09 -0400 |
| commit | a58c99977eafc5f69a3e37f9ddcc328698e7fe1e (patch) | |
| tree | 30207762f9a33aac9f0ac1c1ddc79ee5433036ed /lib/sqlalchemy | |
| parent | 59ebc5286b8df2f0665e454a6cefdf3ad8baf8d1 (diff) | |
| download | sqlalchemy-a58c99977eafc5f69a3e37f9ddcc328698e7fe1e.tar.gz | |
add some cross-linking for orderby/groupby docs + label examples
Change-Id: I34d4958ded8ec95e439ee47fdcb600f357cf7ae3
References: #6324
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/query.py | 20 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 9 |
2 files changed, 25 insertions, 4 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index 7436696a8..cacfb8d84 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -1753,6 +1753,15 @@ class Query( All existing ORDER BY settings can be suppressed by passing ``None``. + .. seealso:: + + These sections describe ORDER BY in terms of :term:`2.0 style` + invocation but apply to :class:`_orm.Query` as well: + + :ref:`tutorial_order_by` - in the :ref:`unified_tutorial` + + :ref:`tutorial_order_by_label` - in the :ref:`unified_tutorial` + """ if len(clauses) == 1 and (clauses[0] is None or clauses[0] is False): @@ -1786,8 +1795,15 @@ class Query( passing ``None`` - this will suppress any GROUP BY configured on mappers as well. - .. versionadded:: 1.1 GROUP BY can be cancelled by passing - ``None``, in the same way as ORDER BY. + .. seealso:: + + These sections describe GROUP BY in terms of :term:`2.0 style` + invocation but apply to :class:`_orm.Query` as well: + + :ref:`tutorial_group_by_w_aggregates` - in the + :ref:`unified_tutorial` + + :ref:`tutorial_order_by_label` - in the :ref:`unified_tutorial` """ diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index adfee1737..45fd26e89 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -3599,7 +3599,9 @@ class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase): .. seealso:: - :ref:`core_tutorial_ordering` + :ref:`tutorial_order_by` - in the :ref:`unified_tutorial` + + :ref:`tutorial_order_by_label` - in the :ref:`unified_tutorial` """ @@ -3627,7 +3629,10 @@ class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase): .. seealso:: - :ref:`core_tutorial_ordering` + :ref:`tutorial_group_by_w_aggregates` - in the + :ref:`unified_tutorial` + + :ref:`tutorial_order_by_label` - in the :ref:`unified_tutorial` """ |
