| Age | Commit message (Collapse) | Author |
|
Thanks Anssi Kääriäinen for providing the solution.
Backport of 2dc9ec5616a942de3a0886a707f93988f56dd594 from master
|
|
foreign/primary key.
Thanks Anssi Kääriäinen for help.
Backport of 333cbdcd2de4546e33ad50ebd8b67e1a1e87aeec 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
|
|
When the query's model had a self-referential foreign key, the
compiler.get_group_by() code incorrectly used the self-referential
foreign key's column (for example parent_id) as GROUP BY clause
when it should have used the model's primary key column (id).
Backport of adc57632bc26cc8fe42bdb6aff463f883214980a from master
|
|
related object filters.
Backport of 9c2d8cde77ee6edd407e92f93eacd4624290394f from master
|
|
Thanks to charettes and priidukull for investigating the issue, and to
kurevin for the report.
Backport of 355c5edd9390caad5725375abca03460805f663b from master
|
|
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.
|
|
Backport of 923da0274a9a8c4ef2ac9776f71bd14628e39fc3 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
|
|
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
|
|
|
|
|