mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #26327 -- Renamed JsonAgg to JSONBAgg.
Thanks to Christian von Roques for the report.
This commit is contained in:
@@ -2,7 +2,7 @@ from django.contrib.postgres.fields import JSONField
|
||||
from django.db.models.aggregates import Aggregate
|
||||
|
||||
__all__ = [
|
||||
'ArrayAgg', 'BitAnd', 'BitOr', 'BoolAnd', 'BoolOr', 'JsonAgg', 'StringAgg',
|
||||
'ArrayAgg', 'BitAnd', 'BitOr', 'BoolAnd', 'BoolOr', 'JSONBAgg', 'StringAgg',
|
||||
]
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class BoolOr(Aggregate):
|
||||
function = 'BOOL_OR'
|
||||
|
||||
|
||||
class JsonAgg(Aggregate):
|
||||
class JSONBAgg(Aggregate):
|
||||
function = 'JSONB_AGG'
|
||||
_output_field = JSONField()
|
||||
|
||||
|
||||
@@ -40,3 +40,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
||||
@cached_property
|
||||
def has_jsonb_datatype(self):
|
||||
return self.connection.pg_version >= 90400
|
||||
|
||||
@cached_property
|
||||
def has_jsonb_agg(self):
|
||||
return self.connection.pg_version >= 90500
|
||||
|
||||
Reference in New Issue
Block a user