summaryrefslogtreecommitdiff
path: root/django/contrib/gis/db/models/sql/conversion.py
AgeCommit message (Collapse)Author
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2017-09-11Fixed #28353 -- Fixed some GIS functions when queryset is evaluated more ↵Sergey Fedoseev
than once. Reverted test for refs #27603 in favor of using FuncTestMixin.
2017-09-08Fixed deepcopy of AreaField and DistanceField.Sergey Fedoseev
2017-07-20Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and ↵Tim Graham
Expression.convert_value(). Unused since a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
2017-04-07Removed more GeoQuerySet leftovers.Sergey Fedoseev
Follow up to a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
2017-04-06Fixed #28006 -- Allowed using D with lookups on Distance annotations.Sergey Fedoseev
2017-04-03Removed Oracle NULL workaround in AreaField.Sergey Fedoseev
Unused since 1b1ea63f6a4784e213c059c69beccaea20bc1a92.
2017-03-23Fixed #27962 -- Allowed lookups on Area annotations.Sergey Fedoseev
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-02-09Refs #26112 -- Fixed aggregate GIS test on Oracle.Shai Berger
Made sure the test doesn't try to aggregate over MultiPolygonField and made AreaField turn decimals into floats on the way from the DB. Thanks Daniel Wiesmann, Jani Tiainen, and Tim Graham for review and discussion.
2016-01-22Fixed #26112 -- Error when computing aggregate of GIS areas.Daniel Wiesmann
Thanks Simon Charette and Claude Paroz for the reviews.
2015-09-21Fixed #24688 -- Added Oracle support for new-style GIS functions.Jani Tiainen
2015-02-20Update converters to take a consistent set of parameters.Marc Tamlyn
As suggested by Anssi. This has the slightly strange side effect of passing the expression to Expression.convert_value has the expression passed back to it, but it allows more complex patterns of expressions.
2015-01-08Fixed #24020 -- Refactored SQL compiler to use expressionsAnssi Kääriäinen
Refactored compiler SELECT, GROUP BY and ORDER BY generation. While there, also refactored select_related() implementation (get_cached_row() and get_klass_info() are now gone!). Made get_db_converters() method work on expressions instead of internal_type. This allows the backend converters to target specific expressions if need be. Added query.context, this can be used to set per-query state. Also changed the signature of database converters. They now accept context as an argument.
2014-09-22Fixed Oracle GIS gml() test failure introduced by e910340; refs #18757.Marc Tamlyn
2014-09-03Fixed #18757, #14462, #21565 -- Reworked database-python type conversionsMarc Tamlyn
Complete rework of translating data values from database Deprecation of SubfieldBase, removal of resolve_columns and convert_values in favour of a more general converter based approach and public API Field.from_db_value(). Now works seamlessly with aggregation, .values() and raw queries. Thanks to akaariai in particular for extensive advice and inspiration, also to shaib, manfre and timograham for their reviews.
2013-11-02Continue to attack E302 violationsAlex Gaynor
2013-10-23Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol
2013-10-10Whitespace cleanup.Tim Graham
* Removed trailing whitespace. * Added newline to EOF if missing. * Removed blank lines at EOF. * Removed some stray tabs.
2013-09-05Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.Eric Boersma
The documentation and comments now all use 'an' to refer to the word SQL and not 'a'.
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-30Refactored and cleaned up parts of the spatial database backend. Changes ↵Justin Bronn
include: * Laid foundations for SpatiaLite support in `GeoQuerySet`, `GeoWhereNode` and the tests. * Added the `Collect` aggregate for PostGIS (still needs tests). * Oracle now goes to 11. * The backend-specific `SpatialRefSys` and `GeometryColumns` models are now attributes of `SpatialBackend`. * Renamed `GeometryField` attributes to be public that were private (e.g., `_srid` -> `srid` and `_geom` -> `geom_type`). * Renamed `create_test_db` to `create_test_spatial_db`. * Removed the legacy classes `GeoMixin` and `GeoQ`. * Removed evil `\` from spatial backend fields. * Moved shapefile data from `tests/layermap` to `tests/data`. Fixed #9794. Refs #9686. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-15Fixed incomplete merge of geographic aggregates; added support for `Extent` ↵Justin Bronn
aggregate to Oracle spatial backend. Refs #3566. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9748 bcc190cf-cafb-0310-a4f2-bffc1f526a37