1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/tests/queries
Simon Charette 65ad4ade74 Refs #28900 -- Made SELECT respect the order specified by values(*selected).
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 d6b6e5d0fd.

Thanks Mariusz Felisiak and Sarah Boyce for review.
2024-07-03 16:36:25 +02:00
..
__init__.py
models.py Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
test_bulk_update.py Made QuerySet.bulk_update() raise an error when batch_size is zero. 2022-06-13 06:25:25 +02:00
test_contains.py
test_db_returning.py
test_explain.py Fixed #35294 -- Fixed TEXT format of QuerySet.explain() for long plans. 2024-03-15 06:58:14 +01:00
test_iterator.py
test_q.py Refs #34007, Refs #35359 -- Added Q.referenced_based_fields property. 2024-05-02 19:05:13 +02:00
test_qs_combinators.py Refs #28900 -- Made SELECT respect the order specified by values(*selected). 2024-07-03 16:36:25 +02:00
test_query.py Refs #33308 -- Avoided passing None to RawSQL's params. 2022-12-02 10:56:09 +01:00
test_sqlcompiler.py
tests.py Refs #28900 -- Made SELECT respect the order specified by values(*selected). 2024-07-03 16:36:25 +02:00