MCPcopy
hub / github.com/django/django / as_sql

Method as_sql

django/db/models/aggregates.py:65–72  ·  view source on GitHub ↗
(self, compiler, connection, **extra_context)

Source from the content-addressed store, hash-verified

63 template = " ORDER BY %(expressions)s"
64
65 def as_sql(self, compiler, connection, **extra_context):
66 if not connection.features.supports_aggregate_order_by_clause:
67 raise NotSupportedError(
68 "This database backend does not support specifying an order on "
69 "aggregates."
70 )
71
72 return super().as_sql(compiler, connection, **extra_context)
73
74
75class Aggregate(Func):

Callers

nothing calls this directly

Calls 2

NotSupportedErrorClass · 0.90
as_sqlMethod · 0.45

Tested by

no test coverage detected