mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Refs #10929 -- Stopped forcing empty result value by PostgreSQL aggregates.
Per deprecation timeline.
This commit is contained in:
		| @@ -52,12 +52,11 @@ General-purpose aggregation functions | ||||
|             from django.db.models import F | ||||
|             F('some_field').desc() | ||||
|  | ||||
|     .. deprecated:: 4.0 | ||||
|     .. versionchanged:: 5.0 | ||||
|  | ||||
|         If there are no rows and ``default`` is not provided, ``ArrayAgg`` | ||||
|         returns an empty list instead of ``None``. This behavior is deprecated | ||||
|         and will be removed in Django 5.0. If you need it, explicitly set | ||||
|         ``default`` to ``Value([])``. | ||||
|         In older versions, if there are no rows and ``default`` is not | ||||
|         provided, ``ArrayAgg`` returned an empty list instead of ``None``. If | ||||
|         you need it, explicitly set ``default`` to ``Value([])``. | ||||
|  | ||||
| ``BitAnd`` | ||||
| ---------- | ||||
| @@ -173,12 +172,11 @@ General-purpose aggregation functions | ||||
|             {'parking': True, 'double_bed': True} | ||||
|         ]}]> | ||||
|  | ||||
|     .. deprecated:: 4.0 | ||||
|     .. versionchanged:: 5.0 | ||||
|  | ||||
|         If there are no rows and ``default`` is not provided, ``JSONBAgg`` | ||||
|         returns an empty list instead of ``None``. This behavior is deprecated | ||||
|         and will be removed in Django 5.0. If you need it, explicitly set | ||||
|         ``default`` to ``Value('[]')``. | ||||
|         In older versions, if there are no rows and ``default`` is not | ||||
|         provided, ``JSONBAgg`` returned an empty list instead of ``None``. If | ||||
|         you need it, explicitly set ``default`` to ``Value([])``. | ||||
|  | ||||
| ``StringAgg`` | ||||
| ------------- | ||||
| @@ -232,12 +230,11 @@ General-purpose aggregation functions | ||||
|             'headline': 'NASA uses Python', 'publication_names': 'Science News, The Python Journal' | ||||
|         }]> | ||||
|  | ||||
|     .. deprecated:: 4.0 | ||||
|     .. versionchanged:: 5.0 | ||||
|  | ||||
|         If there are no rows and ``default`` is not provided, ``StringAgg`` | ||||
|         returns an empty string instead of ``None``. This behavior is | ||||
|         deprecated and will be removed in Django 5.0. If you need it, | ||||
|         explicitly set ``default`` to ``Value('')``. | ||||
|         In older versions, if there are no rows and ``default`` is not | ||||
|         provided, ``StringAgg`` returned an empty string instead of ``None``. | ||||
|         If you need it, explicitly set ``default`` to ``Value("")``. | ||||
|  | ||||
| Aggregate functions for statistics | ||||
| ================================== | ||||
|   | ||||
		Reference in New Issue
	
	Block a user