summaryrefslogtreecommitdiff
path: root/django/contrib/gis/db
AgeCommit message (Collapse)Author
2026-03-12Refs #36727 -- Factored out _must_transform_value() in BaseSpatialOperations.Simon Charette
2026-03-12Fixed #36727 -- Deprecated Field.get_placeholder in favor of ↵Simon Charette
get_placeholder_sql. The lack of ability of the get_placeholder call chain to return SQL and parameters separated so they can be mogrified by the backend at execution time forced implementations to dangerously interpolate potentially user controlled values. The get_placeholder_sql name was chosen due to its proximity to the previous method, but other options such as Field.as_sql were considered but ultimately rejected due to its different input signature compared to Expression.as_sql that might have lead to confusion. There is a lot of overlap between what Field.get_db_prep_value and get_placeholder_sql do but folding the latter in the former would require changing its return signature to return expression which is a way more invasive change than what is proposed here. Given we always call get_db_prep_value it might still be an avenue worth exploring in the future to offer a publicly documented interface to allow field to take an active part in the compilation chain. Thanks Jacob for the review.
2026-02-03Fixed CVE-2026-1207 -- Prevented SQL injections in RasterField lookups via ↵Jacob Walls
band index. Thanks Tarek Nakkouch for the report, and Simon Charette for the initial triage and review.
2025-12-28Added some skips to GIS tests.Tim Graham
Also replaced some DatabaseFeatures.supports_<foo>_lookup attributes with @skipUnlessGISLookup.
2025-11-25Fixed #35783 -- Added NumDimensions GIS database function and ↵David Smith
__num_dimensions lookup.
2025-10-29Refs #35972 -- Returned params in a tuple in further lookups.Jacob Walls
2025-10-27Fixed #36624 -- Dropped support for MySQL < 8.4.Mariusz Felisiak
2025-10-03Fixed #36623 -- Dropped support for PostgreSQL 14 and PostGIS 3.1.Mariusz Felisiak
2025-09-22Refs #33783 -- Added IsEmpty GIS database function and __isempty lookup on ↵David Smith
SpatiaLite.
2025-08-04Fixed #35972 -- Fixed lookup crashes after subquery annotations.Jacob Walls
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-07-20Fixed #28696 -- Added GeometryType GIS database function and __geom_type lookup.Ahmed Ibrahim
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-06-25Fixed #36471 -- Added support for __coveredby GIS lookup and Collect, ↵Mariusz Felisiak
GeoHash, IsValid on MariaDB 12.0.1+.
2025-06-05Added validation to BaseSpatialFeatures.has_<Func>_function.Tim Graham
2025-03-31Refs #28909 -- Simplified code using unpacking generalizations.Aarni Koskela
2025-03-30Fixed warnings per flake8 7.2.0.Mariusz Felisiak
https://github.com/PyCQA/flake8/releases/tag/7.2.0
2025-03-03Fixed #35444 -- Added generic support for Aggregate.order_by.Chris Muthig
This moves the behaviors of `order_by` used in Postgres aggregates into the `Aggregate` class. This allows for creating aggregate functions that support this behavior across all database engines. This is shown by moving the `StringAgg` class into the shared `aggregates` module and adding support for all databases. The Postgres `StringAgg` class is now a thin wrapper on the new shared `StringAgg` class. Thank you Simon Charette for the review.
2025-03-01Applied Black's 2025 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/25.1.0
2025-02-23Fixed #35705 -- Added Rotate GIS database function to rotate geometries.enprava
2025-02-13Reverted "Refs #35803 -- Added support for __coveredby GIS lookup on MariaDB ↵Mariusz Felisiak
11.7+." This partly reverts commit 0b7edb9fcdd33d47ec5701b4f9b9553e27a88e95. MariaDB reverted GIS functions.
2025-02-13Reverted "Fixed #35803 -- Added support for Collect, GeoHash, and IsValid on ↵Mariusz Felisiak
MariaDB 11.7+." This reverts commit c77573716a58af32ffcfc4fe87ff9e5c97909bd2. MariaDB reverted GIS functions.
2025-02-04Fixed #36058 -- Refactored SpatialRefSysMixin.srs to use cached_property.Arnaldo Govenem
Replaced manual caching complexity with cached_property for efficiency. Enhanced error handling with distinct messages for WKT and PROJ.4. Thanks to Sarah Boyce for the suggestions.
2025-01-15Refs #33817 -- Removed support for cx_Oracle per deprecation timeline.Sarah Boyce
2024-10-25Refs #35803 -- Added support for __covers GIS lookup on MySQL.Mariusz Felisiak
2024-10-25Fixed #35803 -- Added support for Collect, GeoHash, and IsValid on MariaDB ↵Mariusz Felisiak
11.7+.
2024-10-25Refs #35803 -- Added support for __coveredby GIS lookup on MySQL and MariaDB ↵Mariusz Felisiak
11.7+.
2024-09-19Fixed #35074 -- Fixed adding/removing indexes when spatial_index is changed ↵Mariusz Felisiak
on MySQL, PostgreSQL, and Oracle. Co-authored-by: Mário Falcão <mario@falcao.dev>
2024-09-10Refs #35074 -- Added _create_spatial_index_sql()/_delete_spatial_index_sql() ↵Mariusz Felisiak
hooks to GIS backends.
2024-09-10Refs #35074 -- Added PostGISSchemaEditor._create_spatial_index_name().Mário Falcão
This is consistent with Oracle and MySQL GIS database backends.
2024-07-29Refs #35074 -- Simplified and unified adding spatial indexes on MySQL and ↵Mariusz Felisiak
Oracle. This uses `deferred_sql` and `_field_indexes_sql()` instead of custom hooks on MySQL.
2024-06-20Refs #35074 -- Avoided failed attempts to remove spatial indexes on nullable ↵Mariusz Felisiak
fields on MySQL. MySQL doesn't support spatial indexes on NULL columns, so there is no point in removing them.
2024-05-27Fixed #35479 -- Dropped support for PostgreSQL 13 and PostGIS 3.0.Mariusz Felisiak
2024-04-26Refs #35339 -- Fixed source expressions in GeoAggregate on Oracle.Mariusz Felisiak
Regression in 42b567ab4c5bfb1bbd3e629b1079271c5ae44ea0.
2024-03-18Refs #31014 -- Added srid argument to FromWKB/FromWKT() GIS functions.Claude Paroz
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2024-01-06Fixed #35088 -- Added support for Collect on MySQL 8.0.24+.Nick Pope
2024-01-05Simplified dropping spatial indexes on MySQL and Oracle.Mariusz Felisiak
2024-01-05Fixed #35086 -- Added support for BoundedCircle on Spatialite 5.1+.David Smith
Spatialite 5.1 added support for BoundingCircle (GEOSMinimumBoundingCircle). GEOS 3.7 is required which is lower than Django's currently supported minmum of 3.8. https://groups.google.com/g/spatialite-users/c/hAJ2SgitN4M https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html
2023-10-06Fixed #34882 -- Fixed no options in AsGeoJSON() for geometries in ↵Denis Rouzaud
non-default CRS.
2023-09-20Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5.Mariusz Felisiak
2023-08-10Fixed #33817 -- Added support for python-oracledb and deprecated cx_Oracle.Jingbei Li
2023-08-04Fixed #34760 -- Dropped support for SQLite < 3.27.Mariusz Felisiak
2023-08-02Removed unneeded escapes in regexes.Mariusz Felisiak
Special characters lose their special meaning inside sets of characters. "-" lose its special meaning if it's placed as the first or last character. Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1.
2023-07-18Refs #33201 -- Avoided unnecessary queries when renaming models with ↵Mariusz Felisiak
db_table on SpatiaLite.
2023-06-16Fixed #34629 -- Added filtering support to GIS aggregates.Olivier Le Thanh Duong
2023-06-16Refs #34629 -- Changed SDOAGGRTYPE wrapping to Func() in GIS aggregates on ↵Mariusz Felisiak
Oracle.
2023-02-21Fixed #34344 -- Allowed PostGIS DatabaseWrapper subclasses to customize ↵David Buhler
(features/introspection/ops)_class classes.
2023-02-07Fixed #33638 -- Fixed GIS lookups crash with geography fields on PostGIS.Jacob Walls
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0