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 15:17:36 -0300 |
| commit | 8adc7c86ab85ed91e512bc49056e301cbe1715d0 (patch) | |
| tree | a4c1db1e984a7f429974e242877fb0523e003fed /docs/ref | |
| parent | fc62e17778dad9eab9e507d90d85a33d415f64a7 (diff) | |
Fixed #34808 -- Doc'd aggregate function's default argument.
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 3295e4ce7d..a3a3ed39c2 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3909,7 +3909,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 @@ -3947,7 +3948,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`` ~~~~~~~ @@ -3957,7 +3959,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`` ~~~~~~~~~~ @@ -3968,7 +3971,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 @@ -3984,7 +3988,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 @@ -4001,7 +4006,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 |
