django/tests/postgres_tests
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
..
array_default_migrations Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
array_index_migrations Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00
migrations Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5. 2023-09-20 13:45:51 +02:00
__init__.py Fixed #29084 -- Skipped some postgres_tests.test_search tests when pg_catalog isn't English. 2022-12-06 08:26:43 +01:00
fields.py Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
integration_settings.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
models.py Refs #33872 -- Removed django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField. 2023-09-18 22:12:40 +02:00
test_aggregates.py Fixed #35479 -- Dropped support for PostgreSQL 13 and PostGIS 3.0. 2024-05-27 09:49:25 +02:00
test_apps.py Fixed #34849 -- Avoided raising RuntimeWarning about import-time queries when apps are reinitialized with test tools. 2023-09-25 08:17:03 +02:00
test_array.py Refs #28900 -- Made SELECT respect the order specified by values(*selected). 2024-07-03 16:36:25 +02:00
test_bulk_update.py Refs #33308 -- Moved psycopg2 imports to the psycopg_any module. 2022-12-12 08:36:17 +01:00
test_constraints.py Fixed #35479 -- Dropped support for PostgreSQL 13 and PostGIS 3.0. 2024-05-27 09:49:25 +02:00
test_functions.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_hstore.py Fixed #35436 -- Fixed displaying Unicode chars in forms.HStoreField. 2024-05-10 09:42:07 +02:00
test_indexes.py Fixed #35479 -- Dropped support for PostgreSQL 13 and PostGIS 3.0. 2024-05-27 09:49:25 +02:00
test_integration.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_introspection.py Refs #33308 -- Ensured type handlers are registered for all PostgreSQL specific tests. 2022-12-01 09:39:46 +01:00
test_operations.py Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition. 2024-03-01 07:15:32 +01:00
test_ranges.py Refs #33308 -- Moved psycopg2 imports to the psycopg_any module. 2022-12-12 08:36:17 +01:00
test_search.py Applied Black's 2024 stable style. 2024-01-26 12:45:07 +01:00
test_signals.py Fixed typo in tests/postgres_tests/test_signals.py comment. 2022-12-06 12:52:56 +01:00
test_trigram.py Refs #33308 -- Ensured type handlers are registered for all PostgreSQL specific tests. 2022-12-01 09:39:46 +01:00
test_unaccent.py Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:04:38 +01:00