| Age | Commit message (Collapse) | Author |
|
Refs #23820.
Fixed #19738.
Refs #17755. In order not to introduce a regression for raw queries,
parameters are passed through the connection.ops.value_to_db_* methods,
depending on their type.
|
|
object filters.
|
|
|
|
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
|
|
|
|
Previously related fields didn't implement get_lookup, instead
related fields were treated specially. This commit removed some of
the special handling. In particular, related fields return Lookup
instances now, too.
Other notable changes in this commit is removal of support for
annotations in names_to_path().
|
|
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.
|
|
Joint effort between myself, Josh, Anssi and Shai.
|
|
|
|
At the same time, made sure that empty nodes in where clause match
everything.
|
|
Instead of splitting filter clauses to where and having parts before
adding them to query.where or query.having, add all filter clauses to
query.where, and when compiling the query split the where to having and
where parts.
|
|
This function is unused since 6fe2b001dba45134d7c10729c57959995e241a88
|
|
This method was inadvertently reintroduced in
f59fd15c4928caf3dfcbd50f6ab47be409a43b01
|
|
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
|
|
|
|
The failure was introduced in Django by
c7fd9b242d2d63406f1de6cc3204e35aaa025233 and the change in
Python 3.5 is https://hg.python.org/cpython/rev/a3c345ba3563.
|
|
|
|
refs #11629.
|
|
|
|
|
|
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.
|