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

Method as_sql

django/db/models/functions/json.py:12–17  ·  view source on GitHub ↗
(self, compiler, connection, **extra_context)

Source from the content-addressed store, hash-verified

10 output_field = JSONField()
11
12 def as_sql(self, compiler, connection, **extra_context):
13 if not connection.features.supports_json_field:
14 raise NotSupportedError(
15 "JSONFields are not supported on this database backend."
16 )
17 return super().as_sql(compiler, connection, **extra_context)
18
19 def as_native(self, compiler, connection, *, returning, **extra_context):
20 # PostgreSQL 16+ and Oracle remove SQL NULL values from the array by

Callers 4

as_nativeMethod · 0.95
as_postgresqlMethod · 0.45
as_sqlMethod · 0.45
as_postgresqlMethod · 0.45

Calls 1

NotSupportedErrorClass · 0.90

Tested by

no test coverage detected