| Age | Commit message (Collapse) | Author |
|
sized arrays.
The array fields opt-out heuristic failed to account for sized arrays.
Note that we keep relying on db_type as opposed to performing an ArrayField
instance check against the column's field as there could be other
implementations of model fields that use Postgres arrays to store the
optimization must be disabled for all of them.
Refs #35936.
Thanks Claude Paroz for the report and test.
Backport of 22fc151bb86a553d84c62d7effd289356e9b6c6c from main.
|
|
|
|
HStoreField.
|
|
remove_trailing_nulls=True.
|
|
Previously the order was always extra_fields + model_fields + annotations with
respective local ordering inferred from the insertion order of *selected.
This commits introduces a new `Query.selected` propery that keeps tracks of the
global select order as specified by on values assignment. This is crucial
feature to allow the combination of queries mixing annotations and table
references.
It also allows the removal of the re-ordering shenanigans perform by
ValuesListIterable in order to re-map the tuples returned from the database
backend to the order specified by values_list() as they'll be in the right
order at query compilation time.
Refs #28553 as the initially reported issue that was only partially fixed
for annotations by d6b6e5d0fd4e6b6d0183b4cf6e4bd4f9afc7bf67.
Thanks Mariusz Felisiak and Sarah Boyce for review.
|
|
Co-authored-by: Priyansh Saxena <askpriyansh@gmail.com>
Co-authored-by: Niclas Olofsson <n@niclasolofsson.se>
Co-authored-by: David Smith <smithdc@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Abhinav Yadav <abhinav.sny.2002@gmail.com>
|
|
Thanks Eugene Morozov and Ben Nace for the reports.
|
|
Array(Min/Max)LengthValidator.
|
|
QuerySet.values()/values_list() on compound queries.
Co-authored-by: Matthias Kestenholz <mk@feinheit.ch>
|
|
Used the same approach as for #34176 by using selected expressions
position to prevent ambiguous aliases in collisions.
Thanks henribru for the report.
Regression in 04518e310d4552ff7595a34f5a7f93487d78a406.
|
|
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
|
|
Regression in b7b28c7c189615543218e81319473888bc46d831.
Refs #31377.
Thanks Shai Berger for the report and reviews.
test_aggregation_subquery_annotation_values_collision() has been
updated as queries that are explicitly grouped by a subquery should
always be grouped by it and not its outer columns even if its alias
collides with referenced table columns. This was not possible to
accomplish at the time 10866a10 landed because we didn't have compiler
level handling of colliding aliases.
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews.
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
specific tests.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
ArrayField's __overlap lookup.
Thanks Mads Jensen and kosz85 and the initial patch.
|
|
values.
Thanks jerch and David Sanders for reviews.
|
|
only NULL values.
|
|
|
|
This ensures explicit grouping from using values() before annotating an
aggregate function groups by selected aliases if supported.
The GROUP BY feature is disabled on Oracle because it doesn't support it.
|
|
|
|
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
|
|
Most QuerySet methods are mapped onto the Manager and, in general,
it isn't necessary to call .all() on the manager.
|
|
|
|
|
|
psycopg2 2.8.4 is the first release to support Python 3.8.
|
|
|
|
Tests should not rely on auto PKs.
Test regression in 33403bf80f635577a18426bc99c8a65e31fd8dfa.
|
|
expressions.
Thanks Mariusz Felisiak and Simon Charette for reviews.
|
|
ArrayField lookups.
|
|
|
|
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
|
|
test_grouping_by_annotations_with_array_field_param().
output_field cannot be automatically determined because the first
argument passed to ARRAY_LEN is an ArrayField and the second one is an
integer.
|
|
|
|
RangeFields.
_get_FIELD_display() crashed when Field.choices was unhashable.
|
|
lists and tuples.
|
|
|
|
trailing values.
|
|
|
|
django.db.models.fields.mixins.
|
|
over AutoField.
|
|
expressions with params.
|
|
Thanks to Evgeniy Krysanov for the report and the idea to use to_python.
Thanks to Mariusz Felisiak for the test case.
|
|
parameters.
Fixed in d87bd29c4f8dfcdf3f4a4eb8340e6770a2416fe3.
|
|
ArrayField.
Fixed in 3af695eda24b874486ee8be7e0d729761b3bdc71.
|
|
|
|
Thanks Mariusz for suggesting it.
|
|
|
|
|