| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
| |
As mentioned in the pre-existing split_exclude() docstring EXISTS is
easier to optimize for query planers and circumvents the IN (NULL)
handling issue.
|
|
|
|
| |
Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
|
|
|
|
|
|
| |
Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd.
Thanks Simon Charette and Igor Jerosimić for the report.
|
| |
|
|
|
|
| |
Thanks Simon Charette for the initial patch.
|
| |
|
|
|
|
|
|
| |
The latter is already optimized to limit the number of results, avoid
selecting unnecessary fields, and drop ordering if possible without
altering the semantic of the query.
|
|
|
|
|
|
| |
This required implementing a limited form of dynamic dispatch to combine
expressions with numerical output. Refs #26355 should eventually provide
a better interface for that.
|
|
|
|
|
|
|
|
|
|
| |
Previously unresolved Value() instances were only allowed to be
compiled if they weren't initialized with an output_field.
Given the usage of unresolved Value() instances is relatively common in
as_sql() overrides it's less controversial to add explicit support for
this previously undefined behavior now and revisit whether or not it
should be deprecated in the future.
|
|
|
|
|
|
|
|
| |
combined expressions.
Thanks Thodoris Sotiropoulos for the report and Simon Charette for the
implementation idea.
Regression in df32fd42b84cc6dbba173201f244491b0d154a63.
|
| |
|
| |
|
|
|
|
| |
This removes also unused DatabaseOperations.date_interval_sql().
|
| |
|
|
|
|
|
|
|
|
| |
expressions.
Regression in df32fd42b84cc6dbba173201f244491b0d154a63.
Thanks Simon Charette for the review.
|
|
|
|
|
| |
Regression in 3a941230c85b2702a5e1cd97e17251ce21057efa.
Thanks Tomasz Szymański for the report.
|
|
|
|
| |
expression.
|
| |
|
|
|
|
| |
Regression in 691def10a0197d83d2d108bd9043b0916d0f09b4.
|
|
|
|
|
|
|
|
| |
Exists() annotation and aggregation on Oracle.
Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
the GROUP BY clause.
Regression in efa1908f662c19038a944129c81462485c4a9fe8.
|
|
|
|
| |
in database functions.
|
| |
|
|
|
|
|
|
|
| |
Both backends order NULLs first on ascending ordering and last on
descending ordering which makes ORDER BY IS (NOT)? NULL wasteful when
asc(nulls_first) and desc(nulls_last) are used since it prevents indice
usage.
|
|
|
|
|
|
|
|
|
|
| |
BY clauses.
Thanks Johannes Hoppe for the report.
Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
aggregations.
Thanks Johannes Hoppe for the report.
Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
MySQL & MariaDB support the standard IS NULL and IS NOT NULL so
the same workaround used for NULLS FIRST and NULLS LAST that is
used for SQLite < 3.30.0 can be used.
Thanks Simon Charette for the discussion.
|
|
|
| |
ISNULL function already returns 0 and 1 on MySQL.
|
| |
|
|
|
|
|
|
|
|
|
| |
implemented comparisons.
Changed __eq__ to return NotImplemented instead of False if compared to
an object of the same type, as is recommended by the Python data model
reference. Now these models can be compared to ANY (or other objects
with __eq__ overwritten) without returning False automatically.
|
|
|
|
|
| |
RawSQL() on Oracle.
Follow up to efa1908f662c19038a944129c81462485c4a9fe8.
|
|
|
|
|
|
|
|
|
|
|
| |
This allows using expressions that have an output_field that is a
BooleanField to be used directly in a queryset filters, or in the
When() clauses of a Case() expression.
Thanks Josh Smeaton, Tim Graham, Simon Charette, Mariusz Felisiak, and
Adam Johnson for reviews.
Co-Authored-By: NyanKiyoshi <hello@vanille.bid>
|
|
|
|
|
| |
Subquery expression objects, when pickled, were evaluating the QuerySet
objects saved in its _constructor_args attribute.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in
the following cases.
1. When part of a SELECT clause.
2. When part of a ORDER BY clause.
3. When compared against another expression in the WHERE clause.
This commit moves the systematic CASE WHEN wrapping of Exists.as_oracle
to contextual .select_format, Lookup.as_oracle, and OrderBy.as_oracle
methods in order to avoid unnecessary wrapping.
|
|
|
|
|
| |
This will expose an intermediary hook for expressions that need special
formatting when used in a SELECT clause.
|
|
|
|
|
|
|
| |
calls.
The method doesn't expect a connection object to be passed as its second
argument.
|
|
|
|
| |
source expressions is not filterable.
|
| |
|
|
|
|
|
|
|
|
|
| |
Expressions referring to different bound fields should not be
considered equal.
Thanks Julien Enselme for the detailed report.
Regression in bc7e288ca9554ac1a0a19941302dea19df1acd21.
|
| |
|
| |
|
|
|
|
|
| |
After 3a505c70e7b228bf1212c067a8f38271ca86ce09, all _prepare() methods
return self.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes Subquery a thin wrapper over Query and makes sure it respects
the Expression source expression API by accepting the same number of
expressions as it returns. Refs #30188.
It also makes OuterRef usable in Query without Subquery wrapping. This
should allow Query's internals to more easily perform subquery push downs
during split_exclude(). Refs #21703.
|
|
|
|
| |
Subquery only uses Query.
|
|
|
|
|
|
|
| |
Subquery annotations can be omitted from the GROUP BY clause on aggregation
as long as they are not explicitly grouped against.
Thanks Jonny Fuller for the report.
|
| |
|