MCPcopy
hub / github.com/django/django / get_group_by_cols

Method get_group_by_cols

django/db/models/sql/query.py:1297–1305  ·  view source on GitHub ↗
(self, wrapper=None)

Source from the content-addressed store, hash-verified

1295 ]
1296
1297 def get_group_by_cols(self, wrapper=None):
1298 # If wrapper is referenced by an alias for an explicit GROUP BY through
1299 # values() a reference to this expression and not the self must be
1300 # returned to ensure external column references are not grouped against
1301 # as well.
1302 external_cols = self.get_external_cols()
1303 if any(col.possibly_multivalued for col in external_cols):
1304 return [wrapper or self]
1305 return external_cols
1306
1307 def as_sql(self, compiler, connection):
1308 # Some backends (e.g. Oracle) raise an error when a subquery contains

Callers 3

get_group_byMethod · 0.45
get_aggregationMethod · 0.45
set_group_byMethod · 0.45

Calls 1

get_external_colsMethod · 0.95

Tested by

no test coverage detected