summaryrefslogtreecommitdiff
path: root/django/db/models/sql/compiler.py
AgeCommit message (Collapse)Author
2019-12-02[3.0.x] Fixed #30953 -- Made select_for_update() lock queryset's model when ↵Mariusz Felisiak
using "self" with multi-table inheritance. Thanks Abhijeet Viswa for the report and initial patch. Backport of 0107e3d1058f653f66032f7fd3a0bd61e96bf782 from master
2019-10-11[3.0.x] Fixed #30854 -- Fixed QuerySet.select_related() with multiple ↵Hasan Ramezani
FilteredRelations. Backport of 6a75cea76a98c08bf2e20d787be9b14c2cd94860 from master.
2019-09-09Fixed #28107 -- Added ↵Vojtech Bocek
DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models.
2019-09-09Refs #29444 -- Allowed returning multiple fields from INSERT statements on ↵Johannes Hoppe
PostgreSQL. Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and Mariusz Felisiak for reviews.
2019-08-13Refs #25367 -- Moved select_format hook to BaseExpression.Simon Charette
This will expose an intermediary hook for expressions that need special formatting when used in a SELECT clause.
2019-07-11Refs #30557 -- Fixed crash of ordering by ptr fields when Meta.ordering ↵Mariusz Felisiak
contains F() expressions. Thanks Can Sarıgöl for the report. Follow up to 8c5f9906c56ac72fc4f13218dd90bdf9bc8a248b.
2019-07-11Fixed #30557 -- Fixed crash of ordering by ptr fields when Meta.ordering ↵Hasan Ramezani
contains expressions.
2019-07-08Refs #29444 -- Added support for fetching a returned non-integer insert ↵Johannes Hoppe
values on Oracle. This is currently not actively used, since the ORM will ask the SQL compiler to only return auto fields.
2019-06-19Fixed #29834 -- Fixed column mismatch crash with ↵can
QuerySet.values()/values_list() and order_by() on combined querysets.
2019-06-19Fixed #30572 -- Prevented values()/values_list() on combined queryset from ↵Mariusz Felisiak
mutating the list of columns in querysets.
2019-05-31Fixed #26192 -- Fixed crash of ordering by constants on PostgreSQL.Mariusz Felisiak
Thanks Simon Charette for the review.
2019-05-23Fixed #30501 -- Preventing QuerySet.reverse() from mutating expressions in ↵Mariusz Felisiak
QuerySet.order_by and Meta.ordering.
2019-05-18Fixed #30463 -- Fixed crash of deprecation message when Meta.ordering ↵ruchit2801
contains expressions. Regression in 1b1f64ee5a78cc217fead52cbae23114502cf564.
2019-05-03Fixed #29692 -- Fixed removing ordering parts for multiline RawSQL expressions.can
2019-04-23Fixed #29810 -- Fixed crash of select_related() on FilteredRelation with ↵can
empty result.
2019-04-18Fixed #30335, #29139 -- Fixed crash when ordering or aggregating over a ↵can
nested JSONField key transform.
2019-03-21Refs #27149, #29542 -- Simplified subquery parentheses wrapping logic.Simon Charette
2019-02-14Fixed #29619 -- Added field names to some FieldErrors.Hasan Ramezani
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2019-01-30Refs #29444 -- Renamed DatabaseFeatures.can_return_id* to be generic for ↵Johannes Hoppe
other columns.
2019-01-17Refs #28370 -- Removed support for the context arg of Field.from_db_value() ↵Tim Graham
and Expression.convert_value(). Per deprecation timeline.
2019-01-14Fixed #30093 -- Fixed ordering of combined queryset ordered by F expressions.Sergey Fedoseev
2018-12-06Fixed #29932 -- Fixed combining compound queries with sub-compound queries ↵Mariusz Felisiak
on SQLite and Oracle.
2018-09-13Refs #14357 -- Deprecated Meta.ordering affecting GROUP BY queries.Ramiro Morales
Thanks Ramiro Morales for contributing to the patch.
2018-08-29Fixed #29694 -- Fixed column mismatch crash with QuerySet.values() or ↵Mariusz Felisiak
values_list() after combining querysets with extra() with union(), difference(), or intersection(). Regression in 0b66c3b442875627fa6daef4ac1e90900d74290b.
2018-08-03Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.Tom
2018-07-25Refs #29563 -- Fixed SQLCompiler.execute_sql() to respect ↵Andrew Brown
DatabaseFeatures.can_use_chunked_reads.
2018-07-14Fixed #29542 -- Fixed invalid SQL if a Subquery from the HAVING clause is ↵Mariusz Felisiak
used in the GROUP BY clause. Thanks Tim Graham for the review.
2018-07-10Deleted unused variable in SQLCompiler.get_related_selections().Mads Jensen
Unused since 01d440fa1e6b5c62acfa8b3fde43dfa1505f93c6.
2018-05-27Fixed #29416 -- Removed unnecesary subquery from GROUP BY clause on MySQL ↵Mariusz Felisiak
when using a RawSQL annotation. Regression in 1d070d027c218285b66c0bde8079034b33a87f11.
2018-04-19Fixed #28574 -- Added QuerySet.explain().Tom
2018-04-13Fixed #29286 -- Fixed column mismatch crash with QuerySet.values() or ↵Mariusz Felisiak
values_list() after combining an annotated and unannotated queryset with union(), difference(), or intersection(). Regression in a0c03c62a8ac586e5be5b21393c925afa581efaf. Thanks Tim Graham and Carlton Gibson for reviews.
2018-03-19Fixed #29229 -- Fixed column mismatch crash when combining two annotated ↵Astral
values_list() querysets with union(), difference(), or intersection(). Regression in 7316720603821ebb64dfe8fa592ba6edcef5f3e.
2018-02-10Fixed #24747 -- Allowed transforms in QuerySet.order_by() and distinct(*fields).Matthew Wilkes
2018-02-08Fixed #29108 -- Fixed crash in aggregation of distinct+ordered+sliced querysets.Simon Charette
Regression in 4acae21846f6212aa992763e587c7e201828d7b0. Thanks Stephen Brooks for the report.
2018-01-12Fixed #28996 -- Simplified some boolean constructs and removed trivial ↵Дилян Палаузов
continue statements.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2017-12-26Fixed #28944 -- Fixed crash when chaining values()/values_list() after ↵Ran Benita
QuerySet.select_for_update(of=()).
2017-12-11Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking.Nick Pope
2017-12-07Fixed #28906 -- Removed unnecessary bool() calls.Tim Graham
2017-11-21Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after ↵Dražen Odobašić
values() and values_list().
2017-11-12Fixed #28781 -- Added QuerySet.values()/values_list() support for union(), ↵Mariusz Felisiak
difference(), and intersection(). Thanks Tim Graham for the review.
2017-10-28Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.Ran Benita
Thanks Adam Chidlow for polishing the patch.
2017-10-09Fixed #28670 -- Added FETCH/OFFSET support on Oracle.Mariusz Felisiak
Thanks Tim Graham for the review.
2017-10-06Refs #24254 -- Removed unnecessary SQL AS clause in SQLCompiler.as_sql().Mariusz Felisiak
Incorrect on Oracle.
2017-10-04Refs #28670 -- Moved LIMIT/OFFSET SQL to DatabaseOperations.limit_offset_sql().Mariusz Felisiak
Thanks Tim Graham for the review.
2017-10-03Fixed #28675 -- Removed always True variable in ↵Tim Graham
SQLInsertCompiler.execute_sql() check. Unused since 7deb25b8dd5aa1ed02b5e30cbc67cd1fb0c3d6e6.
2017-10-02Fixed #28652 -- Fixed a few comments in django/db/models/*.Дилян Палаузов
2017-09-22Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵Nicolas Delaby
support. Thanks Anssi Kääriäinen for contributing to the patch.
2017-09-18Fixed #26608 -- Added support for window expressions (OVER clause).Mads Jensen
Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes, Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie Cockburn for initial patch.