| Age | Commit message (Collapse) | Author |
|
expressions
The query used a construct of qs.annotate().values().aggregate() where
the first annotate used an F-object reference and the values() and
aggregate() calls referenced that F-object.
Also made sure the inner query's select clause is as simple as possible,
and made sure .values().distinct().aggreate() works correctly.
Backport of fb146193c49e4c683dc8da39d9b7c479375fdb57 from master
|
|
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
|
|
Joint effort between myself, Josh, Anssi and Shai.
Conflicts:
django/db/models/query.py
tests/model_fields/models.py
Backport of 4755f8fc25331c739a6f932cc8aba0cc9e62e352 from master.
|
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
This function is unused since 6fe2b001dba45134d7c10729c57959995e241a88
Backport of f79ce63fdb6788c8b4857fece6c86de57fc129ee from master
|
|
This method was inadvertently reintroduced in
f59fd15c4928caf3dfcbd50f6ab47be409a43b01
Backport of 99ca7c2bd3e04b343f4a0fe2d5add7c6d6f3a456 from master
|
|
Backport of a0b5f15ea5f from master.
|
|
Backport of 29c0073335c7f7cdc482866e093e5e42a42625e5 from master
|
|
Backport of 8196e4bdf498acb05e6680c81f9d7bf700f4295c from master
|
|
The failure was introduced in Django by
c7fd9b242d2d63406f1de6cc3204e35aaa025233 and the change in
Python 3.5 is https://hg.python.org/cpython/rev/a3c345ba3563.
Backport of be1357e70983d4ad029a1ecdd05292f8be917a80 from master
|
|
Backport of 69c6a6868f0b4137bb293ff4326ecf4681506c37 from master
|
|
refs #24031
Thanks to Tim Graham and Michał Modzelewski for the review.
|
|
|
|
|
|
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.
|
|
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
|
|
|
|
Refactored bump_prefix() to avoid infinite loop and allow more than
than 5 subquires by extending the alphabet to use multi-letters.
|
|
|
|
|
|
|
|
|
|
comprehension
|
|
Also removed Query.join_map. This structure was used to speed up join
reuse calculation. Initial benchmarking shows that this isn't actually
needed. If there are use cases where the removal has real-world
performance implications, it should be relatively straightforward to
reintroduce it as map {alias: [Join-like objects]}.
|
|
Aggregation over subquery produced syntactically incorrect queries in
some cases as Django didn't ensure that source expressions of the
aggregation were present in the subquery.
|
|
|
|
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
|
|
Added relabeled_clone() method to sql.Query to fix the problem. It
manifested itself in rare cases where at least double nested subquery's
filter condition might target non-existing alias.
Thanks to Trac alias ris for reporting the problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Refs #14334
|
|
|
|
|
|
Thanks Collin Anderson for the review.
|
|
|
|
Thanks Tim Graham for the review.
|
|
refs #23395.
|
|
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.
|
|
|
|
Small modifications done by committer.
|
|
A regression caused queries to produce incorrect results for cases where
extra(select) is excluded by values() but included by extra(order_by)
The regression was caused by 2f35c6f10fcbae541691207fb0c0560a13b754fc.
|
|
|
|
Thanks rpbarlow for the suggestion; and loic, akaariai, and jorgecarleitao
for reviews.
|
|
|