Anssi Kääriäinen
70ff455a35
[1.8.x] Fixed #24615 -- ordering by expression not part of SELECT
...
Fixed queries where an expression was used in order_by() but the
expression wasn't in the query's select clause (for example the
expression could be masked by .values() call)
Thanks to Trac alias MattBlack85 for the report.
Backport of fb5c7748da
from master.
2015-04-16 09:42:42 +02:00
Josh Smeaton
a0cebe82b5
[1.8.x] Refs #24485 -- Renamed some expression types
...
Backport of 88d798d71a
from master
2015-03-17 08:40:45 -04:00
Marc Tamlyn
3886338c1d
[1.8.x] Update converters to take a consistent set of parameters.
...
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.
Backport of 32d4db66b9
from master
2015-02-20 11:47:48 +00:00
Tim Graham
a8b70d251d
[1.8.x] Sorted imports with isort; refs #23860 .
...
Backport of 0ed7d15563
from master
2015-02-09 14:24:06 -05:00
Collin Anderson
fc8e1e0c10
[1.8.x] Fixed E265 comment style
...
Backport of db77915c9f
from master
2015-02-06 09:35:08 -05:00
Claude Paroz
c77dd64402
[1.8.x] Fixed #14483 -- Allowed using subqueries with GIS lookups
...
Backport of a0b5f15ea5
from master.
2015-01-30 20:29:05 +01:00
Josh Smeaton
e56810e839
[1.8.x] Fixed #24154 -- Backends can now check support for expressions
...
Backport of 8196e4bdf4
from master
2015-01-27 14:47:38 +11:00
Claude Paroz
6b1b7263f4
[1.8.x] Fixed PostGIS crosses lookup and added crosses test
...
Backport of aff0e54d5
from master.
2015-01-17 15:46:50 +01:00
Claude Paroz
a79e6b6717
Fixed #24152 -- Deprecated GeoQuerySet aggregate methods
...
Thanks Josh Smeaton and Tim Graham for the reviews.
2015-01-16 19:53:02 +01:00
Claude Paroz
a34fba5e59
Simplified a bit GeoAggregate classes
...
Thanks Josh Smeaton for the review. Refs #24152 .
2015-01-16 10:40:45 +01:00
Claude Paroz
67bcae1e58
Moved check_aggregate_support to BaseSpatialOperations
2015-01-14 22:03:41 +01:00
Tim Graham
28308078f3
Fixed #22603 -- Reorganized classes in django.db.backends.
2015-01-14 14:16:20 -05:00
Claude Paroz
e084ff01f2
Fixed #24136 -- Prevented crash when convert_extent input is None
...
Thanks Max Demars for the report.
2015-01-13 17:27:11 +01:00
Anssi Kääriäinen
0c7633178f
Fixed #24020 -- Refactored SQL compiler to use expressions
...
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.
2015-01-08 14:07:54 -05:00
Daniel Pyrathon
fb48eb0581
Fixed #12663 -- Formalized the Model._meta API for retrieving fields.
...
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
2015-01-06 19:25:12 -05:00
Andriy Sokolovskiy
839f431ef5
Fixed #24064 -- Prevented database access at compile time in spatialite models.
2015-01-02 12:04:57 -05:00
Daniel Pyrathon
8958170755
Fixed #9104 -- Moved FieldDoesNotExist to core.exceptions
2015-01-02 10:46:04 -05:00
Claude Paroz
234a2e0b6b
Fixed #23866 -- Harmonized refs to Django documentation from code
2014-12-25 13:53:13 +01:00
Claude Paroz
df30ae07fc
Fixed postgis test database initialization
...
Refs #20968 . Allow querying template_postgis presence without
existing test database.
Thanks Tim Graham for the review.
2014-12-12 20:08:07 +01:00
Claude Paroz
bac7664f27
Ran 'CREATE EXTENSION postgis' during prepare_database hook
...
DatabaseWrapper.prepare_database has been introduced in 307de67073
.
2014-12-08 22:22:53 +01:00
Claude Paroz
8f97413fae
Fixed #20968 -- Checked Spatialite metadata before migrations
...
Thanks Kenial S. Lee for the initial patch and Tim Graham for
the review.
2014-12-08 22:22:53 +01:00
Anssi Kääriäinen
cbb5cdd155
Fixed #23867 -- removed DateQuerySet hacks
...
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
2014-11-26 17:49:25 -05:00
Carl Meyer
d2bcb05980
Fixed #23873 -- Improved GIS error message when GEOS is not installed.
...
Thanks Claude for writing the patch.
2014-11-19 19:23:13 -07:00
Carl Meyer
0eba8bd8f6
Fixed GeoSQLCompiler to pass itself correctly to column as_sql.
2014-11-19 08:33:38 -07:00
Carl Meyer
84d88f5cbe
Removed a deprecated use of SQLCompiler as quote_name in GIS.
2014-11-19 08:03:48 -07:00
Josh Smeaton
f61256da3a
Renamed qn to compiler
2014-11-16 13:19:34 +01:00
Josh Smeaton
f59fd15c49
Fixed #14030 -- Allowed annotations to accept all expressions
2014-11-15 14:00:43 +00:00
Veres Lajos
a71a2ea756
Fixed typos using https://github.com/vlajos/misspell_fixer
2014-11-03 20:59:30 -05:00
Tim Graham
d6d55368d4
Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on PostGIS.
...
Thanks raratiru for the report and Claude Paroz for review.
2014-10-31 18:37:52 -04:00
Tim Graham
e548d08f24
Renamed SpatiaLite feature flag introduced in refs #23152 .
...
Thanks Doug Goldstein for the suggestion.
2014-10-31 15:55:45 -04:00
Tim Graham
57e40551e4
Fixed #23152 -- Added support for transactional Spatialite metadata initialization.
...
Thanks Doug Goldstein for the initial patch.
2014-10-30 13:52:42 -04:00
Tim Graham
03bd79ed21
Fixed #23719 -- Fixed MySQL 5.6 crash with GeometryFields in migrations.
2014-10-29 08:21:24 -04:00
Claude Paroz
63ff417746
Fixed a tuple/int comparison in spatialite backend
...
On Python 3, comparing tuple with int raises a TypeError.
2014-10-11 16:56:48 +02:00
Claude Paroz
65c1a37490
Converted GIS lookups for Oracle
2014-10-09 21:38:50 +02:00
Claude Paroz
2bd1bbc424
Converted GIS lookups to use the new Lookup API
...
Thanks Tim Graham, Anssi Kääriäinen and Marc Tamlyn for the
reviews.
2014-10-09 21:38:50 +02:00
Thomas Chaumeny
b2aad7b836
Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
...
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Claude Paroz
d1ca70110f
Factorized schema_editor() at BaseDatabaseWrapper level
2014-09-26 08:50:16 +02:00
Tim Graham
a8f07530a7
Fixed #23537 -- Added Oracle GIS SchemaEditor.
...
Thanks Shai Berger for review.
2014-09-25 20:16:54 -04:00
Tim Graham
74e7f91e6d
Fixed #23538 -- Added SchemaEditor for MySQL GIS.
...
Thanks Claude Paroz for suggestions and review.
2014-09-25 13:53:44 -04:00
Marc Tamlyn
c6fd1e904c
Fixed Oracle GIS gml() test failure introduced by e910340; refs #18757 .
2014-09-22 13:10:03 +01:00
Loic Bistuer
c9a53035d6
Generate GeoManager from GeoQuerySet. Refs #20625 .
...
This cleanup lays the groundwork for #23533 and also addresses
the issue that GeoManager.get_queryset() failed to pass the
database router hints to the QuerySet constructor.
Thanks Anssi Kääriäinen for the review.
2014-09-22 17:18:08 +07:00
Tim Graham
185ab9ffef
Fixed Oracle GIS failures introduced by e9103402c0; refs #18757 .
...
Thanks Marc Tamlyn for the patch.
2014-09-19 07:51:42 -04:00
Claude Paroz
abc11b0a33
Fixed #23514 -- Prevented queries in PostGISOperations init
...
Thanks Mattia Procopio for the report.
2014-09-18 20:00:35 +02:00
Tim Graham
33e817a6d8
Added feature flag for geometry_field_introspection; refs #22632 and #23504 .
2014-09-18 07:32:51 -04:00
Tim Graham
6c1a0581ab
Added a feature flag for add_srs_entry support; refs #22632 and #23504 .
2014-09-18 07:28:05 -04:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -04:00
Marc Tamlyn
e9103402c0
Fixed #18757 , #14462 , #21565 -- Reworked database-python type conversions
...
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.
2014-09-03 20:36:03 +01:00
Claude Paroz
60428ed5db
Removed some more hardcoded backends in GIS tests
...
Refs #22632 . Thanks Tim Graham for the review.
2014-08-26 20:08:00 +02:00
Claude Paroz
ba1d707b0f
Replaced no_mysql by connection features
...
Refs #22632 . Thanks Tim Graham for the review.
2014-08-23 15:44:34 +02:00
Claude Paroz
a7d964ab87
Replaced no_spatialite by connection features
...
Refs #22632 . Thanks Tim Graham for the review.
2014-08-23 15:41:13 +02:00