summaryrefslogtreecommitdiff
path: root/django/db/models/sql
AgeCommit message (Collapse)Author
2019-01-30[2.0.x] Fixed E117 and F405 flake8 warnings.Mariusz Felisiak
Backport of 5a5c77d55dc85c7e6cf910243257e408887f412a from master
2018-05-27[2.0.x] Fixed #29416 -- Removed unnecesary subquery from GROUP BY clause on ↵Mariusz Felisiak
MySQL when using a RawSQL annotation. Regression in 1d070d027c218285b66c0bde8079034b33a87f11. Backport of 4ab1f559e8d1264bcb20bb497988973194f5d8f2 from master
2018-04-13[2.0.x] Fixed #29286 -- Fixed column mismatch crash with QuerySet.values() ↵Mariusz Felisiak
or 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. Backport of 0b66c3b442875627fa6daef4ac1e90900d74290b from master
2018-03-19[2.0.x] Fixed #29229 -- Fixed column mismatch crash when combining two ↵Amr Anwar
annotated values_list() querysets with union(), difference(), or intersection(). Regression in 7316720603821ebb64dfe8fa592ba6edcef5f3e. Backport of a0c03c62a8ac586e5be5b21393c925afa581efaf from master
2018-02-08[2.0.x] Fixed #29108 -- Fixed crash in aggregation of ↵Simon Charette
distinct+ordered+sliced querysets. Regression in 4acae21846f6212aa992763e587c7e201828d7b0. Thanks Stephen Brooks for the report. Backport of d61fe246015aa4fdc6dcb837ffb1442fa71ae586 from master
2017-12-26[2.0.x] Fixed #28944 -- Fixed crash when chaining values()/values_list() ↵Ran Benita
after QuerySet.select_for_update(of=()). Backport of c21f158295d92e35caf96436bfdbbff554fc5569 from master
2017-12-12[2.0.x] Refs #27985 -- Reallowed using __exact=None as an alias for ↵Sergey Fedoseev
__isnull=True if a custom lookup class with lookup_name != None is registered as the exact lookup. Regression in 58da81a5a372a69f0bac801c412b57f3cce5f188 and prerequisite for refs #28896. Backport of 10bfa876be59feec24bb6a40fa11bece808ee405 from master
2017-12-01[2.0.x] Fixed #28863 -- Fixed filter on annotation that contains Q.Sergey Fedoseev
Backport of cf12257db23fa248c89a3da3f718aa01a50ca659 from master
2017-11-21[2.0.x] Fixed #28817 -- Made QuerySet.iterator() use server-side cursors ↵Dražen Odobašić
after values() and values_list(). Backport of d97f026a7ab5212192426e45121f7a52751a2044 from master
2017-11-12[2.0.x] Fixed #28781 -- Added QuerySet.values()/values_list() support for ↵Mariusz Felisiak
union(), difference(), and intersection(). Thanks Tim Graham for the review. Backport of 2d3cc94284674638c334670903d49565039d77ae from master
2017-10-28[2.0.x] Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE ↵Ran Benita
.. OF. Thanks Adam Chidlow for polishing the patch. Backport of 03049fb8d96ccd1f1ed0285486103542de42faba from master
2017-10-16[2.0.x] Fixed #28497 -- Restored the ability to use sliced QuerySets with ↵Tim Graham
__exact. Regression in ec50937bcbe160e658ef881021402e156beb0eaf. Thanks Simon Charette for review. Backport of 1b73ccc4bf78af905f72f4658cf463f38ebf7b97 from master
2017-10-06[2.0.x] Refs #24254 -- Removed unnecessary SQL AS clause in ↵Mariusz Felisiak
SQLCompiler.as_sql(). Incorrect on Oracle. Backport of 11ade8eefd32f5bc7ee6379b77824f02ca61c20b from master
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-20Removed unused list in Query.resolve_lookup_value().Nicolas Delaby
Unneeded since its introduction in 4f138fe5a496a81115c4fba6615a517fc62c3b17.
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.
2017-09-15Removed unnecessary check in SQLCompiler.get_related_selections().Tim Graham
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-09-07Removed unneeded __init__() methods.Sergey Fedoseev
2017-09-03Updated EmpytResultSet import not to use the alias.Mariusz Felisiak
2017-09-02Moved select_sql in SQLCompiler.get_extra_select() to improve performance.Mariusz Felisiak
2017-08-31Fixed #28549 -- Fixed QuerySet.defer() with super and subclass fields.Jeremy Kerr
Previously, deferring fields in different classes didn't omit the superclass' deferred field. Thanks Simon Charette for the suggested fix.
2017-08-23Refs #28459 -- Improved performance of SQLCompiler.apply_converters().Sergey Fedoseev
2017-08-15Simplified generation of result in Query.get_aggregation().Sergey Fedoseev
2017-08-15Avoided creation of temporary set in Query.append_annotation_mask().Sergey Fedoseev
2017-08-11Simplified calculation of used joins in Query.build_filter().Sergey Fedoseev
2017-08-11Removed outdated comment in Query.build_filter().Sergey Fedoseev
2017-08-08Refs #28459 -- Improved performance of sql.compiler.cursor_iter().Sergey Fedoseev
2017-08-07Refs #28459 -- Improved performance of SQLCompiler.results_iter().Sergey Fedoseev
2017-08-01Fixed #28454 -- Simplifed use of Query.setup_joins() by returning a named tuple.Matthew Wilkes
2017-08-01Refs #28370 -- Moved db converters deprecation warning to improve performance.Sergey Fedoseev
2017-07-31Fixed #27985 -- Fixed query for __exact=value when get_prep_value() converts ↵Sergey Fedoseev
value to None. Also fixed crash of .filter(field__transform=None).
2017-07-31Refs #20880 -- Removed non-cloning logic from Query.clone().Anssi Kääriäinen
2017-07-31Fixed #28453 -- Made __exact=None lookup use transforms.Sergey Fedoseev
2017-07-31Avoided creating temporary lists for obtaining the first item.Sergey Fedoseev
2017-07-29Avoided creation of temporary sets.Sergey Fedoseev
2017-07-20Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and ↵Tim Graham
Expression.convert_value(). Unused since a0d166306fbdc41f49e6fadf4ec84b17eb147daa.
2017-07-15Fixed #28399 -- Fixed QuerySet.count() for union(), difference(), and ↵Florian Apolloner
intersection() queries.
2017-07-10Fixed #28378 -- Fixed union() and difference() when combining with a ↵Mariusz Felisiak
queryset raising EmptyResultSet. Thanks Jon Dufresne for the report. Thanks Tim Graham and Simon Charette for the reviews.
2017-07-08Removed useless hasattr in UpdateQuery._setup_query().Tim Graham
The if statement always evaluates to True.
2017-07-07Removed unused Query.clone() memo kwarg.Tim Graham
Unused since 23ca3a01940c63942885df4709712cebf4df79ec.
2017-06-29Fixed #28010 -- Added FOR UPDATE OF support to QuerySet.select_for_update().Ran Benita
2017-06-29Removed obsolete Query.tables attribute.Anssi Kääriäinen
Obsolete since Query.alias_map became an OrderedDict (refs #26522).
2017-06-13Refs #23853 -- Updated sql.query.Query.join() docstring.Tim Graham
Follow up to ab89414f40db1598364a7fe4cfac1766cacd2668.
2017-06-13Fixed #28293 -- Fixed union(), intersection(), and difference() when ↵Mariusz Felisiak
combining with an EmptyQuerySet. Thanks Jon Dufresne for the report and Tim Graham for the review.
2017-06-08Removed unused sql.Query.query_termsClaude Paroz
Unused since 5008a4db440c8f7d108a6979b959025ffb5789ba.
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-06-01Fixed #27639 -- Added chunk_size parameter to QuerySet.iterator().François Freitag
2017-05-27Fixed #28249 -- Removed unnecessary dict.keys() calls.Jon Dufresne
iter(dict) is equivalent to iter(dict.keys()).
2017-05-11Fixed #24254 -- Fixed queries using the __in lookup with querysets using ↵Simon Charette
distinct() and order_by(). Thanks Tim for the review.