Loading django/contrib/gis/db/backends/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ class BaseSpatialOperations(object): """ raise NotImplementedError('Distance operations not available on this spatial backend.') def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Returns the placeholder for the given geometry field with the given value. Depending on the spatial backend, the placeholder may contain a Loading django/contrib/gis/db/backends/mysql/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -35,14 +35,14 @@ class MySQLOperations(DatabaseOperations, BaseSpatialOperations): def geo_db_type(self, f): return f.geom_type def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ The placeholder here has to include MySQL's WKT constructor. Because MySQL does not support spatial transformations, there is no need to modify the placeholder based on the contents of the given value. """ if hasattr(value, 'as_sql'): placeholder, _ = qn.compile(value) placeholder, _ = compiler.compile(value) else: placeholder = '%s(%%s)' % self.from_text return placeholder django/contrib/gis/db/backends/oracle/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations): return [dist_param] def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Provides a proper substitution value for Geometries that are not in the SRID of the field. Specifically, this routine will substitute in the Loading @@ -205,7 +205,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations): placeholder = '%s' # No geometry value used for F expression, substitute in # the column name instead. sql, _ = qn.compile(value) sql, _ = compiler.compile(value) return placeholder % sql else: if transform_value(value, f.srid): Loading django/contrib/gis/db/backends/postgis/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): else: return [dist_param] def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Provides a proper substitution value for Geometries that are not in the SRID of the field. Specifically, this routine will substitute in the Loading @@ -300,7 +300,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): # If this is an F expression, then we don't really want # a placeholder and instead substitute in the column # of the expression. sql, _ = qn.compile(value) sql, _ = compiler.compile(value) placeholder = placeholder % sql return placeholder Loading django/contrib/gis/db/backends/spatialite/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): dist_param = value return [dist_param] def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Provides a proper substitution value for Geometries that are not in the SRID of the field. Specifically, this routine will substitute in the Loading @@ -193,7 +193,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): placeholder = '%s' # No geometry value used for F expression, substitute in # the column name instead. sql, _ = qn.compile(value) sql, _ = compiler.compile(value) return placeholder % sql else: if transform_value(value, f.srid): Loading Loading
django/contrib/gis/db/backends/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ class BaseSpatialOperations(object): """ raise NotImplementedError('Distance operations not available on this spatial backend.') def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Returns the placeholder for the given geometry field with the given value. Depending on the spatial backend, the placeholder may contain a Loading
django/contrib/gis/db/backends/mysql/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -35,14 +35,14 @@ class MySQLOperations(DatabaseOperations, BaseSpatialOperations): def geo_db_type(self, f): return f.geom_type def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ The placeholder here has to include MySQL's WKT constructor. Because MySQL does not support spatial transformations, there is no need to modify the placeholder based on the contents of the given value. """ if hasattr(value, 'as_sql'): placeholder, _ = qn.compile(value) placeholder, _ = compiler.compile(value) else: placeholder = '%s(%%s)' % self.from_text return placeholder
django/contrib/gis/db/backends/oracle/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations): return [dist_param] def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Provides a proper substitution value for Geometries that are not in the SRID of the field. Specifically, this routine will substitute in the Loading @@ -205,7 +205,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations): placeholder = '%s' # No geometry value used for F expression, substitute in # the column name instead. sql, _ = qn.compile(value) sql, _ = compiler.compile(value) return placeholder % sql else: if transform_value(value, f.srid): Loading
django/contrib/gis/db/backends/postgis/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): else: return [dist_param] def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Provides a proper substitution value for Geometries that are not in the SRID of the field. Specifically, this routine will substitute in the Loading @@ -300,7 +300,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations): # If this is an F expression, then we don't really want # a placeholder and instead substitute in the column # of the expression. sql, _ = qn.compile(value) sql, _ = compiler.compile(value) placeholder = placeholder % sql return placeholder Loading
django/contrib/gis/db/backends/spatialite/operations.py +2 −2 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): dist_param = value return [dist_param] def get_geom_placeholder(self, f, value, qn): def get_geom_placeholder(self, f, value, compiler): """ Provides a proper substitution value for Geometries that are not in the SRID of the field. Specifically, this routine will substitute in the Loading @@ -193,7 +193,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations): placeholder = '%s' # No geometry value used for F expression, substitute in # the column name instead. sql, _ = qn.compile(value) sql, _ = compiler.compile(value) return placeholder % sql else: if transform_value(value, f.srid): Loading