| Age | Commit message (Collapse) | Author |
|
Thanks Anssi Kääriäinen for providing the solution.
Backport of 2dc9ec5616a942de3a0886a707f93988f56dd594 from master
|
|
|
|
|
|
QuerySet.exists() incorrectly handled query.group_by = True
case (grouping by all select fields), causing GROUP BY
expressions to be wiped along with select fields.
Backport of 801a84ae329a24d9adf01b700429fe8f1285b2b8 from master
|
|
Avoided split_exclude() for Q when used as an expression.
Backport of bc87061a3c7c8d6b4d2469f35cc78683c6cff647 from master
|
|
related object filters.
Backport of 9c2d8cde77ee6edd407e92f93eacd4624290394f from master
|
|
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
|
|
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 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
|
|
|
|
|
|
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.
|
|
|
|
Thanks rpbarlow for the suggestion; and loic, akaariai, and jorgecarleitao
for reviews.
|
|
|
|
Thanks jorgecarleitao for the suggestion.
|
|
|
|
|
|
|
|
Ordering by reverse foreign key was broken by custom lookups patch
(commit 20bab2cf9d02a5c6477d8aac066a635986e0d3f3).
Thanks to everybody who helped solving this issue. Special thanks to
Trac alias takis for reporting this.
|
|
|