mirror of https://github.com/django/django.git
Cared for PostGIS 2 renamed operations
This commit is contained in:
parent
92b5341b19
commit
864a0514b8
|
@ -231,7 +231,6 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
|
||||||
self.distance_spheroid = prefix + 'distance_spheroid'
|
self.distance_spheroid = prefix + 'distance_spheroid'
|
||||||
self.envelope = prefix + 'Envelope'
|
self.envelope = prefix + 'Envelope'
|
||||||
self.extent = prefix + 'Extent'
|
self.extent = prefix + 'Extent'
|
||||||
self.extent3d = prefix + 'Extent3D'
|
|
||||||
self.force_rhr = prefix + 'ForceRHR'
|
self.force_rhr = prefix + 'ForceRHR'
|
||||||
self.geohash = GEOHASH
|
self.geohash = GEOHASH
|
||||||
self.geojson = GEOJSON
|
self.geojson = GEOJSON
|
||||||
|
@ -239,14 +238,12 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
|
||||||
self.intersection = prefix + 'Intersection'
|
self.intersection = prefix + 'Intersection'
|
||||||
self.kml = prefix + 'AsKML'
|
self.kml = prefix + 'AsKML'
|
||||||
self.length = prefix + 'Length'
|
self.length = prefix + 'Length'
|
||||||
self.length3d = prefix + 'Length3D'
|
|
||||||
self.length_spheroid = prefix + 'length_spheroid'
|
self.length_spheroid = prefix + 'length_spheroid'
|
||||||
self.makeline = prefix + 'MakeLine'
|
self.makeline = prefix + 'MakeLine'
|
||||||
self.mem_size = prefix + 'mem_size'
|
self.mem_size = prefix + 'mem_size'
|
||||||
self.num_geom = prefix + 'NumGeometries'
|
self.num_geom = prefix + 'NumGeometries'
|
||||||
self.num_points =prefix + 'npoints'
|
self.num_points =prefix + 'npoints'
|
||||||
self.perimeter = prefix + 'Perimeter'
|
self.perimeter = prefix + 'Perimeter'
|
||||||
self.perimeter3d = prefix + 'Perimeter3D'
|
|
||||||
self.point_on_surface = prefix + 'PointOnSurface'
|
self.point_on_surface = prefix + 'PointOnSurface'
|
||||||
self.polygonize = prefix + 'Polygonize'
|
self.polygonize = prefix + 'Polygonize'
|
||||||
self.reverse = prefix + 'Reverse'
|
self.reverse = prefix + 'Reverse'
|
||||||
|
@ -259,6 +256,15 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
|
||||||
self.union = prefix + 'Union'
|
self.union = prefix + 'Union'
|
||||||
self.unionagg = prefix + 'Union'
|
self.unionagg = prefix + 'Union'
|
||||||
|
|
||||||
|
if version >= (2, 0, 0):
|
||||||
|
self.extent3d = prefix + '3DExtent'
|
||||||
|
self.length3d = prefix + '3DLength'
|
||||||
|
self.perimeter3d = prefix + '3DPerimeter'
|
||||||
|
else:
|
||||||
|
self.extent3d = prefix + 'Extent3D'
|
||||||
|
self.length3d = prefix + 'Length3D'
|
||||||
|
self.perimeter3d = prefix + 'Perimeter3D'
|
||||||
|
|
||||||
def check_aggregate_support(self, aggregate):
|
def check_aggregate_support(self, aggregate):
|
||||||
"""
|
"""
|
||||||
Checks if the given aggregate name is supported (that is, if it's
|
Checks if the given aggregate name is supported (that is, if it's
|
||||||
|
|
Loading…
Reference in New Issue