| Age | Commit message (Collapse) | Author |
|
DateTimeCheckMixin classes.
|
|
default when USE_TZ = True.
|
|
use non-kwargs initialization.
This prefers non-kwargs construction of dynamically generated Q()
objects to create a single Q() object instead of many and then
combining them, where possible.
|
|
|
|
through_fields is a list.
Regression in c32d8f33d8e988a376e44997b8f3606d821f305e.
|
|
Unused since 3caf957ed5eaa831a485abcb89f27266dbf3e82b.
|
|
after only().
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Thanks to Simon Charette and Adam Johnson for the reviews.
|
|
cursor_iter() helper calls cursor.close() in a finally block.
|
|
django.db.models.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
The Python's Steering Council decided to revert changes in the Enum
module (see https://bugs.python.org/issue44559) and moved them to
Python 3.11.
Follow up to 5d9b065d3f93de056588dfee6f1776294dd8bab2.
Thanks Nick Pope for the review.
|
|
QuerySet.filter().
Thanks Hannes Ljungberg and Simon Charette for reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
get_col() used "self" as "output_field" when it was not given, and
unnecessarily compared "self" to "self".
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
The introduction of the Expression.empty_aggregate_value interface
allows the compilation stage to enable the EmptyResultSet optimization
if all the aggregates expressions implement it.
This also removes unnecessary RegrCount/Count.convert_value() methods.
Disabling the empty result set aggregation optimization when it wasn't
appropriate prevented None returned for a Count aggregation value.
Thanks Nick Pope for the review.
|
|
Disable the EmptyResultSet optimization when performing aggregation as
it might interfere with coalescence.
|
|
Co-Authored-By: Simon Charette <charette.s@gmail.com>
|
|
|
|
updated.
Co-authored-by: Diego Lima <diego.lima@lais.huol.ufrn.br>
|
|
primary keys on models with invalid app_label.
Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.
Thanks Iuri de Silvio for the report.
|
|
PostgreSQL.
This partly reverts commit fdfbc66331292def201c9344e3cd29fbcbcd076a
unnecessary since b69b0c3fe871167a0ca01bb439508e335143801f.
|
|
Field.contribute_to_class().
Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
|
|
QuerySet.values_list().
Regression in 981a072dd4dec586f8fc606712ed9a2ef116eeee.
Thanks pirelle for the report.
|
|
when not passed during initialization.
Thanks Simon Charette for the implementation idea.
|
|
DatabaseSchemaEditor._unique_sql()/_create_unique_sql() to take fields as second parameter.
|
|
|
|
|
|
primary keys on abstract models.
Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.
|
|
Thanks Simon Charette for the review.
|
|
- Validate filename returned by FileField.upload_to() not a filename
passed to the FileField.generate_filename() (upload_to() may
completely ignored passed filename).
- Allow relative paths (without dot segments) in the generated filename.
Thanks to Jakub Kleň for the report and review.
Thanks to all folks for checking this patch on existing projects.
Thanks Florian Apolloner and Markus Holtermann for the discussion and
implementation idea.
Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3.
|
|
Having lookups group by subquery right-hand-sides is likely unnecessary
in the first place but relatively large amount of work would be needed
to achieve that such as making Lookup instances proper resolvable
expressions.
Regression in 35431298226165986ad07e91f9d3aca721ff38ec.
Thanks James A. Munsch for the report.
|
|
OrderBy expressions.
Regression in c8b659430556dca0b2fe27cf2ea0f8290dbafecd.
Thanks Kevin Marsh for the report.
|
|
|
|
|
|
In Query.join() the argument reuse_with_filtered_relation was used to
determine whether to use == or .equals(). As this area of code is
related to aliases, we only expect an instance of Join or BaseTable to
be provided - the only two classes that provide .equals().
In both cases, the implementations of __eq__() and equals() are based
on use of the "identity" property. __eq__() performs an isinstance()
check first, returning NotImplemented if required. BaseTable.equals()
then does a straightforward equality check on "identity". Join.equals()
is a little bit different as it skips checking the last element of the
"identity" property: filtered_relation. This was only included
previously when the with_filtered_relation argument was True, impossible
since bbf141bcdc31f1324048af9233583a523ac54c94.
|
|
Unused since bbf141bcdc31f1324048af9233583a523ac54c94.
|
|
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.
|
|
self-referential subqueries on MySQL.
|
|
Follow up to 170b006ce82b0ecf26dc088f832538b747ca0115.
|
|
PostgreSQL.
Regression in 3a505c70e7b228bf1212c067a8f38271ca86ce09.
Nonlitteral right-hand-sides of lookups need to be wrapped in
parentheses to avoid operator precedence ambiguities.
Thanks Charles Lirsac for the detailed report.
|
|
This also renames the `asc` variable to `default_order`, markes the
`desc` variable as unused, fixes a typo in SQLCompiler.get_order_by()
docstring, and reorders some blocks in SQLCompiler._order_by_pairs().
|
|
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.
|
|
scalar values on SQLite.
|
|
Unnecessary since 7286eaf681d497167cd7dc8b70ceebfcf5cd21ad.
|
|
CheckConstraint.check and UniqueConstraint.condition.
Regression in b7b7df5fbcf44e6598396905136cab5a19e9faff.
Thanks Szymon Zmilczak for the report.
|
|
|
|
querysets ordered by unannotated columns.
|
|
|
|
|