mirror of
https://github.com/django/django.git
synced 2025-03-06 15:32:33 +00:00
[5.2.x] Reverted "Refs #35803 -- Added support for __coveredby GIS lookup on MariaDB 11.7+."
This partly reverts commit 0b7edb9fcdd33d47ec5701b4f9b9553e27a88e95. MariaDB reverted GIS functions. Backport of 54a902c6e81214462388f79a7c42f1c88c863dfd from main.
This commit is contained in:
parent
fc19618171
commit
d3d9f3a5a4
@ -45,7 +45,6 @@ class MySQLOperations(BaseSpatialOperations, DatabaseOperations):
|
||||
"bboverlaps": SpatialOperator(func="MBROverlaps"), # ...
|
||||
"contained": SpatialOperator(func="MBRWithin"), # ...
|
||||
"contains": SpatialOperator(func="ST_Contains"),
|
||||
"coveredby": SpatialOperator(func="MBRCoveredBy"),
|
||||
"crosses": SpatialOperator(func="ST_Crosses"),
|
||||
"disjoint": SpatialOperator(func="ST_Disjoint"),
|
||||
"equals": SpatialOperator(func="ST_Equals"),
|
||||
@ -58,10 +57,9 @@ class MySQLOperations(BaseSpatialOperations, DatabaseOperations):
|
||||
}
|
||||
if self.connection.mysql_is_mariadb:
|
||||
operators["relate"] = SpatialOperator(func="ST_Relate")
|
||||
if self.connection.mysql_version < (11, 7):
|
||||
del operators["coveredby"]
|
||||
else:
|
||||
operators["covers"] = SpatialOperator(func="MBRCovers")
|
||||
operators["coveredby"] = SpatialOperator(func="MBRCoveredBy")
|
||||
return operators
|
||||
|
||||
@cached_property
|
||||
|
@ -347,7 +347,7 @@ Lookup Type PostGIS Oracle MariaDB MySQL [#]_ S
|
||||
:lookup:`contained` X X X X N
|
||||
:lookup:`contains <gis-contains>` X X X X X B
|
||||
:lookup:`contains_properly` X B
|
||||
:lookup:`coveredby` X X X (≥ 11.7) X X B
|
||||
:lookup:`coveredby` X X X X B
|
||||
:lookup:`covers` X X X X B
|
||||
:lookup:`crosses` X X X X C
|
||||
:lookup:`disjoint` X X X X X B
|
||||
|
@ -183,7 +183,7 @@ PostGIS ``ST_ContainsProperly(poly, geom)``
|
||||
-------------
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_CoveredBy.html>`__,
|
||||
Oracle, MariaDB 11.7+, MySQL, PGRaster (Bilateral), SpatiaLite
|
||||
Oracle, MySQL, PGRaster (Bilateral), SpatiaLite
|
||||
|
||||
Tests if no point in the geometry field is outside the lookup geometry.
|
||||
[#fncovers]_
|
||||
@ -197,14 +197,13 @@ Backend SQL Equivalent
|
||||
========== =============================
|
||||
PostGIS ``ST_CoveredBy(poly, geom)``
|
||||
Oracle ``SDO_COVEREDBY(poly, geom)``
|
||||
MariaDB ``MBRCoveredBy(poly, geom)``
|
||||
MySQL ``MBRCoveredBy(poly, geom)``
|
||||
SpatiaLite ``CoveredBy(poly, geom)``
|
||||
========== =============================
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
MySQL and MariaDB 11.7+ support was added.
|
||||
MySQL support was added.
|
||||
|
||||
.. fieldlookup:: covers
|
||||
|
||||
|
@ -199,8 +199,6 @@ Minor features
|
||||
|
||||
* :lookup:`coveredby` and :lookup:`covers` lookup are now supported on MySQL.
|
||||
|
||||
* :lookup:`coveredby` lookup is now supported on MariaDB 11.7+.
|
||||
|
||||
:mod:`django.contrib.syndication`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user