Skip to content

Commit

Permalink
[3.2.x] Clarified type of Window()'s partition_by and order_by argume…
Browse files Browse the repository at this point in the history
…nts.

Backport of ecf76cc from main
  • Loading branch information
shangxiao authored and felixxm committed Sep 10, 2021
1 parent 54684a3 commit a7be74d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/ref/models/expressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -757,14 +757,15 @@ The ``expression`` argument is either a :ref:`window function
<window-functions>`, an :ref:`aggregate function <aggregation-functions>`, or
an expression that's compatible in a window clause.

The ``partition_by`` argument is a list of expressions (column names should be
wrapped in an ``F``-object) that control the partitioning of the rows.
Partitioning narrows which rows are used to compute the result set.
The ``partition_by`` argument accepts an expression or a sequence of
expressions (column names should be wrapped in an ``F``-object) that control
the partitioning of the rows. Partitioning narrows which rows are used to
compute the result set.

The ``output_field`` is specified either as an argument or by the expression.

The ``order_by`` argument accepts a sequence of expressions on which you can
call :meth:`~django.db.models.Expression.asc` and
The ``order_by`` argument accepts an expression or a sequence of expressions on
which you can call :meth:`~django.db.models.Expression.asc` and
:meth:`~django.db.models.Expression.desc`. The ordering controls the order in
which the expression is applied. For example, if you sum over the rows in a
partition, the first result is the value of the first row, the second is the
Expand Down

0 comments on commit a7be74d

Please sign in to comment.