diff options
| author | VIZZARD-X <vigneshanandmay13@gmail.com> | 2026-01-10 02:26:37 +0530 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-02-13 16:58:36 -0500 |
| commit | 08b4dfc5734f5d2fce685eabcd65385a6656db2f (patch) | |
| tree | 468d1e7db12407c049e892181eb3ac3866b3ab05 /docs/ref | |
| parent | 3dea5fed077e33c7d8bca4b5eeade5420cb05d27 (diff) | |
Fixed #36857 -- Added QuerySet.totally_ordered property.
Thanks Simon Charette for the idea.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 579c0de302..cc264a4e51 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -170,6 +170,18 @@ Here's the formal declaration of a ``QuerySet``: :meth:`order_by` clause or a default ordering on the model. ``False`` otherwise. + .. attribute:: totally_ordered + + .. versionadded:: 6.1 + + Returns ``True`` if the ``QuerySet`` is ordered and the ordering is + deterministic. This requires that the ordering includes a field + (or set of fields) that is unique and non-nullable. + + For queries involving a ``GROUP BY`` clause, the model's default + ordering is ignored. Ordering specified via ``.extra(order_by=...)`` + is also ignored. + .. attribute:: db The database that will be used if this query is executed now. |
