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:10:30 -0300 |
| commit | d4bbdf5337089925f2900c44d3e953a947e4ca0e (patch) | |
| tree | 2fb0c5cfe620d11e1e37221defadbbe7eebe1372 /docs/ref | |
| parent | 0bbe6ca2ac3d70e44081e54c235ff21568bf832c (diff) | |
[5.0.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 5c4760a868..fc1c5571e0 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3910,7 +3910,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 @@ -3948,7 +3949,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`` ~~~~~~~ @@ -3958,7 +3960,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`` ~~~~~~~~~~ @@ -3969,7 +3972,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 @@ -3985,7 +3989,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 @@ -4002,7 +4007,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 |
