django/django
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
..
apps Fixed #34687 -- Made Apps.clear_cache() clear get_swappable_settings_name() cache. 2023-06-30 08:27:15 +02:00
conf Updated source translation catalogs. 2024-05-22 15:55:26 -03:00
contrib Reverted "Fixed #35564 -- Improved readability of subclass identification." 2024-06-28 14:57:41 +02:00
core Fixed #35528 -- Added EmailMultiAlternatives.body_contains() helper method. 2024-06-21 12:00:56 +02:00
db Refs #28900 -- Made SELECT respect the order specified by values(*selected). 2024-07-03 16:36:25 +02:00
dispatch Fixed #35174 -- Fixed Signal.asend()/asend_robust() crash when all receivers are asynchronous. 2024-02-08 11:36:28 +01:00
forms Fixed #35483 -- Added NUL (0x00) character validation to ModelChoiceFields. 2024-06-17 12:19:26 +02:00
http Fixed 35467 -- Replaced urlparse with urlsplit where appropriate. 2024-05-29 10:48:27 -03:00
middleware Fixed 35467 -- Replaced urlparse with urlsplit where appropriate. 2024-05-29 10:48:27 -03:00
template Fixed #35417 -- Updated BaseContext.new() with values to create a context that can be flattened. 2024-06-13 14:22:40 +02:00
templatetags Refs #34233 -- Used str.removeprefix()/removesuffix(). 2023-01-18 19:11:18 +01:00
test Fixed 35467 -- Replaced urlparse with urlsplit where appropriate. 2024-05-29 10:48:27 -03:00
urls Fixed #35252 -- Optimized _route_to_regex(). 2024-03-05 13:09:10 +01:00
utils Fixed #12978 -- Added support for RSS feed stylesheets. 2024-06-18 17:25:43 +02:00
views Removed hardcoded docs version in csrf template. 2024-05-21 11:03:39 +02:00
__init__.py Bumped version; main is now 5.2 pre-alpha. 2024-05-22 15:44:07 -03:00
__main__.py Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
shortcuts.py Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00