diff options
| author | lufafajoshua <lufafajosh@gmail.com> | 2023-09-25 13:25:33 +0300 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2023-10-11 16:11:09 -0300 |
| commit | e8fe48d3a02dbe3b57a87b334f6335b701f0306d (patch) | |
| tree | 8c2ebf2cbc0be14ec846708d15dafd2ea30a5fdc /docs/ref | |
| parent | 830990fa6ca4a76489ce6c943fce3fd0123a449f (diff) | |
[4.2.x] Fixed #34808 -- Doc'd aggregate function's default argument.
Backport of 8adc7c86ab85ed91e512bc49056e301cbe1715d0 from main
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 0d7e9884c3..f58bfa66ed 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3990,7 +3990,8 @@ by the aggregate. * Default alias: ``<field>__avg`` * Return type: ``float`` if input is ``int``, otherwise same as input - field, or ``output_field`` if supplied + field, or ``output_field`` if supplied. If the queryset or grouping is + empty, ``default`` is returned. .. attribute:: distinct @@ -4028,7 +4029,8 @@ by the aggregate. Returns the maximum value of the given expression. * Default alias: ``<field>__max`` - * Return type: same as input field, or ``output_field`` if supplied + * Return type: same as input field, or ``output_field`` if supplied. If the + queryset or grouping is empty, ``default`` is returned. ``Min`` ~~~~~~~ @@ -4038,7 +4040,8 @@ by the aggregate. Returns the minimum value of the given expression. * Default alias: ``<field>__min`` - * Return type: same as input field, or ``output_field`` if supplied + * Return type: same as input field, or ``output_field`` if supplied. If the + queryset or grouping is empty, ``default`` is returned. ``StdDev`` ~~~~~~~~~~ @@ -4049,7 +4052,8 @@ by the aggregate. * Default alias: ``<field>__stddev`` * Return type: ``float`` if input is ``int``, otherwise same as input - field, or ``output_field`` if supplied + field, or ``output_field`` if supplied. If the queryset or grouping is + empty, ``default`` is returned. .. attribute:: sample @@ -4065,7 +4069,8 @@ by the aggregate. Computes the sum of all values of the given expression. * Default alias: ``<field>__sum`` - * Return type: same as input field, or ``output_field`` if supplied + * Return type: same as input field, or ``output_field`` if supplied. If the + queryset or grouping is empty, ``default`` is returned. .. attribute:: distinct @@ -4082,7 +4087,8 @@ by the aggregate. * Default alias: ``<field>__variance`` * Return type: ``float`` if input is ``int``, otherwise same as input - field, or ``output_field`` if supplied + field, or ``output_field`` if supplied. If the queryset or grouping is + empty, ``default`` is returned. .. attribute:: sample |
