| Age | Commit message (Collapse) | Author |
|
operator.
Address a long standing bug in a Where.add optimization to discard
equal nodes that was surfaced by implementing equality for Lookup
instances in bbf141bcdc31f1324048af9233583a523ac54c94.
Thanks Shaheed Haque for the report.
Backport of b81c7562fc33f50166d5120138d6398dc42b13c3 from main
|
|
deconstruction.
Subquery deconstruction support required implementing complex and
expensive equality rules for sql.Query objects for little benefit as
the latter cannot themselves be made deconstructible to their reference
to model classes.
Making Expression @deconstructible and not BaseExpression allows
interested parties to conform to the "expression" API even if they are
not deconstructible as it's only a requirement for expressions allowed
in Model fields and meta options (e.g. constraints, indexes).
Thanks Phillip Cutter for the report.
This also fixes a performance regression in bbf141bcdc31f1324048af9233583a523ac54c94.
Backport of c8b659430556dca0b2fe27cf2ea0f8290dbafecd from main
|
|
Backport of c3278bb71fe03132704525abcdf29bb4f1b3f143 from main
|
|
combination.
This issue started manifesting itself when nesting a combined subquery
relying on exclude() since 8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 but
sql.Query.combine never properly handled subqueries outer refs in the
first place, see QuerySetBitwiseOperationTests.test_subquery_aliases()
(refs #27149).
Thanks Raffaele Salmaso for the report.
Backport of 6d0cbe42c3d382e5393d4af48185c546bb0ada1f from main
|
|
expressions.
Backport of 00b0786de533dbb3f6208d8d5eaddbf765b4e5b8 from main.
Regression in 466920f6d726eee90d5566e0a9948e92b33a122e.
|
|
combined querysets ordered by unannotated columns.
Backport of 9760e262f85ae57df39abe2799eff48a82b14474 from main
|
|
pickleable Q().
Regression in bb0b6e526340e638522e093765e534df4e4393d2.
Backport of 466920f6d726eee90d5566e0a9948e92b33a122e from master
|
|
failures.
Co-authored-by: Tim Graham <timograham@gmail.com>
|
|
|
|
Supported since 84c1826ded17b2d74f66717fb745fc36e37949fd.
|
|
querysets ordered by annotations.
|
|
This also replaces assertQuerysetEqual() to
assertSequenceEqual()/assertCountEqual() where appropriate.
Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
As mentioned in the pre-existing split_exclude() docstring EXISTS is
easier to optimize for query planers and circumvents the IN (NULL)
handling issue.
|
|
By making Query subclass BaseExpression in
35431298226165986ad07e91f9d3aca721ff38ec the former defined it's
identity based off _construct_args which is not appropriate.
|
|
On CockroachDB, primary key values stored in these fields are larger
than they accept. Fixes:
queries.test_bulk_update.BulkUpdateNoteTests.test_multiple_fields,
queries.test_bulk_update.BulkUpdateNoteTests.test_inherited_fields, and
queries.tests.RelatedLookupTypeTests.test_values_queryset_lookup.
|
|
The code from the original fix (922aba3def68e57c405a0e50d353a790af85b00a)
was removed in 419de7b00daabf5e9be064198d370cdbf19b5f2d.
|
|
union() on a single non-empty ordered queryset.
|
|
union(), intersection(), and difference().
|
|
difference().
|
|
combined querysets.
|
|
|
|
Meta.ordering.
Regression in 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6.
Thanks Julien Dutriaux for the report.
|
|
13+.
|
|
QuerySet.alias() allows creating reusable aliases for expressions that
don't need to be selected but are used for filtering, ordering, or as
a part of complex expressions.
Thanks Simon Charette for reviews.
|
|
Thanks Simon Charette for the initial patch.
|
|
|
|
|
|
as rhs in queryset filters.
Regression in 4edad1ddf6203326e0be4bdb105beecb0fe454c4.
|
|
with not selected columns.
|
|
queryset.
|
|
|
|
|
|
|
|
|
|
This allowed the Note model to be used in setUpTestData() which requires
assigned model instances to be copy.deepcopy()'able.
|
|
intersection(), and difference().
|
|
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael
Michel for mentoring this Google Summer of Code 2019 project and
everyone else who helped with the patch.
Special thanks to Mads Jensen, Nick Pope, and Simon Charette for
extensive reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
Resolve the field reference instead of using fragile regex based string
reference validation.
|
|
Now that order_by() has expression support passing RawSQL() can achieve
the same result.
This was also already supported through QuerySet.extra(order_by) for
years but this API is more or less deprecated at this point.
|
|
|
|
following union(), intersection(), and difference().
|
|
expressions.
|
|
|
|
This prevent having to pass simple_col through multiple function calls
by defining whether or not references should be resolved with aliases
at the Query level.
|
|
|
|
It was barely documented without pointers at its defining location and
was abused to prevent misuse of the QuerySet field deferring feature.
|
|
values to tuples.
Regression in 8a281aa7fe76a9da2284f943964a9413697cff1f.
|
|
MariaDB and MySQL 8.0.18+.
|
|
8.0.16+.
|