You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

features.py 962B

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