| Age | Commit message (Collapse) | Author |
|
using "self" with multi-table inheritance.
Thanks Abhijeet Viswa for the report and initial patch.
Backport of 0107e3d1058f653f66032f7fd3a0bd61e96bf782 from master
|
|
list values to tuples.
Regression in 8a281aa7fe76a9da2284f943964a9413697cff1f.
Backport of 8be79984dce7d819879a6e594ca69c5f95a08378 from master
|
|
Thanks Sergey Fedoseev for the implementation idea.
Regression in a68ea231012434b522ce45c513d84add516afa60.
Backport of 2d38eb0ab9f78d68c083a5b78b1eca39027b279a from master
|
|
Allows expected behavior when cast to str, also matching behaviour of
created instances with those fetched from the DB.
Thanks to Simon Charette, Nick Pope, and Shai Berger for reviews.
Backport of dbcd7b064e7278614f29fc45468d461e263d4da7 from master
|
|
FilteredRelations.
Backport of 6a75cea76a98c08bf2e20d787be9b14c2cd94860 from master.
|
|
Regression in 440505cb2cadbe1a5b9fba246bcde6c04f51d07e.
Backport of 95a11578ce41de1e152fe7d173f109e280aebd6d from master
|
|
multiple times in model Meta.ordering.
Backport of c7944628a1979453468d67818c63957532d396d8 from master
|
|
on chaining.
Thanks Darren Maki for the report.
Backport of 37f8f293775d0b672da8ae369d9a4e17f1db7851 from master
|
|
after deleting objects.
Thanks Simon Meers for the original patch.
Backport of f97bbad908df128189eff77d98af9a25ed1ecf23 from master
|
|
columns.
Use pre-existing select fields (and thereby GROUP BY fields) from
subquery if they were specified, instead of always defaulting to pk.
Thanks Aur Saraf for the report and Simon Charette for guidance.
Backport of 0719edcd5fed56157ffb3323a8f634aa5e8f9a80 from master
|
|
SQLite doesn't repoint table aliases in partial index conditions on table
rename which breaks the documented table alteration procedure.
Thanks Pēteris Caune for the report.
|
|
DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models.
|
|
PostgreSQL.
Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and
Mariusz Felisiak for reviews.
|
|
choice.
|
|
These classes can serve as a base class for user enums, supporting
translatable human-readable names, or names automatically inferred
from the enum member name.
Additional properties make it easy to access the list of names, values
and display labels.
Thanks to the following for ideas and reviews:
Carlton Gibson, Fran Hrženjak, Ian Foote, Mariusz Felisiak, Shai Berger.
Co-authored-by: Shai Berger <shai@platonix.com>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
OuterRef right hand sides have to be nested, just like F rhs have to,
during the subquery pushdown split_exclude performs to ensure they are
resolved against the outer query aliases.
|
|
Expressions should never be prepared as other Lookup.get_prep_lookup
implementations hint at by returning early on the presence of the
resolve_expression attribute.
The previous solution was only handling lookups against related fields
pointing at AutoFields and would break for foreign keys to other fields.
It was also causing bidirectional coupling between model fields and
expressions which the method level import of OuterRef was a symptom of.
|
|
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.
|
|
operations for PostgreSQL.
Thanks to Simon Charettes for review.
Co-Authored-By: Daniel Tao <daniel.tao@gmail.com>
|
|
and refactored AutoFields.
This reduces duplication by allowing AutoField, BigAutoField and
SmallAutoField to inherit from IntegerField, BigIntegerField and
SmallIntegerField respectively. Doing so also allows for enabling the
max_length warning check and minimum/maximum value validation for auto
fields, as well as providing a mixin that can be used for other possible
future auto field types such as a theoretical UUIDAutoField.
|
|
key that has a default.
|
|
|
|
Made sql.Where resolve lhs of its child nodes. This is necessary to
allow filter lookups against nested subquery expressions to properly
resolve their OuterRefs to Cols.
Thanks Oskar Persson for the simplified test case.
|
|
|
|
respect model's Meta.ordering.
Regression in 6d4e5feb79f7eabe8a0c7c4b87f25b1a7f87ca0b.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
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.
|
|
This will notably silence the warnings issued when running the test
suite on MySQL.
|
|
AutoField/FloatField/IntegerField values.
Co-authored-by: Diederik van der Boor <vdboor@edoburu.nl>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
|
|
source expressions is not filterable.
|
|
|
|
|
|
using attnames.
Regression in 519016e5f25d7c0a040015724f9920581551cab0.
|
|
Previously, we used Query.can_filter() mainly to check if a query is
sliced what was confusing.
|
|
union(), intersection(), and difference().
|
|
descriptor_class attribute.
Allows model fields to override the descriptor class used on the model
instance attribute.
|
|
instead of a field name.
|
|
|
|
As is_related_object is True, the val variable is unused for the
remainder of the method.
Unnecessary since 53da1e47942f22a56e761d786ba89d05ca55a224.
|
|
for DurationField.
|
|
contains F() expressions.
Thanks Can Sarıgöl for the report.
Follow up to 8c5f9906c56ac72fc4f13218dd90bdf9bc8a248b.
|
|
contains expressions.
|
|
|
|
Expressions referring to different bound fields should not be
considered equal.
Thanks Julien Enselme for the detailed report.
Regression in bc7e288ca9554ac1a0a19941302dea19df1acd21.
|
|
constraints.
|
|
values on Oracle.
This is currently not actively used, since the ORM will ask the
SQL compiler to only return auto fields.
|