| 1 |
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures |
| 2 |
from django.db.backends.mysql.features import DatabaseFeatures as MySQLDatabaseFeatures |
| 3 |
from django.utils.functional import cached_property |
| 4 |
|
| 5 |
|
| 6 |
class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures): |
| 7 |
empty_intersection_returns_none = False |
| 8 |
has_spatialrefsys_table = False |
| 9 |
supports_add_srs_entry = False |
| 10 |
supports_distance_geodetic = False |
| 11 |
supports_length_geodetic = False |
| 12 |
supports_area_geodetic = False |
| 13 |
supports_transform = False |
| 14 |
supports_null_geometries = False |
| 15 |
supports_num_points_poly = False |
| 16 |
unsupported_geojson_options = {"crs"} |
| 17 |
|
| 18 |
@cached_property |
| 19 |
def supports_geometry_field_unique_index(self): |
| 20 |
# Not supported in MySQL since https://dev.mysql.com/worklog/task/?id=11808 |
| 21 |
return self.connection.mysql_is_mariadb |