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

Method as_sql

django/contrib/gis/db/models/functions.py:474–482  ·  view source on GitHub ↗
(self, compiler, connection, **extra_context)

Source from the content-addressed store, hash-verified

472 super().__init__(expr1, **extra)
473
474 def as_sql(self, compiler, connection, **extra_context):
475 if (
476 self.geo_field.geodetic(connection)
477 and not connection.features.supports_length_geodetic
478 ):
479 raise NotSupportedError(
480 "This backend doesn't support Length on geodetic fields"
481 )
482 return super().as_sql(compiler, connection, **extra_context)
483
484 def as_postgresql(self, compiler, connection, **extra_context):
485 clone = self.copy()

Callers

nothing calls this directly

Calls 3

NotSupportedErrorClass · 0.90
geodeticMethod · 0.80
as_sqlMethod · 0.45

Tested by

no test coverage detected