(self, compiler, connection, **extra_context)
| 542 | arity = 1 |
| 543 | |
| 544 | def as_postgresql(self, compiler, connection, **extra_context): |
| 545 | function = None |
| 546 | if self.geo_field.geodetic(connection) and not self.source_is_geography(): |
| 547 | raise NotSupportedError( |
| 548 | "ST_Perimeter cannot use a non-projected non-geography field." |
| 549 | ) |
| 550 | dim = min(f.dim for f in self.get_source_fields()) |
| 551 | if dim > 2: |
| 552 | function = connection.ops.perimeter3d |
| 553 | return super().as_sql(compiler, connection, function=function, **extra_context) |
| 554 | |
| 555 | def as_sqlite(self, compiler, connection, **extra_context): |
| 556 | if self.geo_field.geodetic(connection): |
nothing calls this directly
no test coverage detected