mirror of
https://github.com/django/django.git
synced 2024-11-21 19:09:18 +01:00
Refs #35803 -- Added support for __covers GIS lookup on MySQL.
This commit is contained in:
parent
c77573716a
commit
5cf88dcc57
@ -60,6 +60,8 @@ class MySQLOperations(BaseSpatialOperations, DatabaseOperations):
|
||||
operators["relate"] = SpatialOperator(func="ST_Relate")
|
||||
if self.connection.mysql_version < (11, 7):
|
||||
del operators["coveredby"]
|
||||
else:
|
||||
operators["covers"] = SpatialOperator(func="MBRCovers")
|
||||
return operators
|
||||
|
||||
@cached_property
|
||||
|
@ -348,7 +348,7 @@ Lookup Type PostGIS Oracle MariaDB MySQL [#]_ S
|
||||
: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:`covers` 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
|
||||
:lookup:`distance_gt` X X X X X N
|
||||
|
@ -212,7 +212,7 @@ SpatiaLite ``CoveredBy(poly, geom)``
|
||||
----------
|
||||
|
||||
*Availability*: `PostGIS <https://postgis.net/docs/ST_Covers.html>`__,
|
||||
Oracle, PGRaster (Bilateral), SpatiaLite
|
||||
Oracle, MySQL, PGRaster (Bilateral), SpatiaLite
|
||||
|
||||
Tests if no point in the lookup geometry is outside the geometry field.
|
||||
[#fncovers]_
|
||||
@ -226,9 +226,14 @@ Backend SQL Equivalent
|
||||
========== ==========================
|
||||
PostGIS ``ST_Covers(poly, geom)``
|
||||
Oracle ``SDO_COVERS(poly, geom)``
|
||||
MySQL ``MBRCovers(poly, geom)``
|
||||
SpatiaLite ``Covers(poly, geom)``
|
||||
========== ==========================
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
MySQL support was added.
|
||||
|
||||
.. fieldlookup:: crosses
|
||||
|
||||
``crosses``
|
||||
|
@ -100,7 +100,7 @@ Minor features
|
||||
:meth:`.OGRGeometry.get_linear_geometry` and
|
||||
:meth:`.OGRGeometry.get_curve_geometry` methods.
|
||||
|
||||
* :lookup:`coveredby` lookup is now supported on MySQL.
|
||||
* :lookup:`coveredby` and :lookup:`covers` lookup are now supported on MySQL.
|
||||
|
||||
* :lookup:`coveredby` and :lookup:`isvalid` lookups,
|
||||
:class:`~django.contrib.gis.db.models.Collect` aggregation, and
|
||||
|
Loading…
Reference in New Issue
Block a user