summaryrefslogtreecommitdiff
path: root/django/db/models/sql
AgeCommit message (Collapse)Author
2018-04-13[1.11.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[1.11.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
2017-11-21[1.11.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[1.11.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-09-01[1.11.x] Fixed #26522 -- Fixed a nondeterministic AssertionError in QuerySet ↵Bo Marchman
combining. Thanks Andrew Brown for the test case. Backport of 9bbb6e2d2536c4ac20dc13a94c1f80494e51f8d9 from master
2017-07-15[1.11.x] Fixed #28399 -- Fixed QuerySet.count() for union(), difference(), ↵Florian Apolloner
and intersection() queries. Backport of adab280cefb15659c39558ac26ea392b0a1e456c from master
2017-07-10[1.11.x] Fixed #28378 -- Fixed union() and difference() when combining with ↵Mariusz Felisiak
a queryset raising EmptyResultSet. Thanks Jon Dufresne for the report. Thanks Tim Graham and Simon Charette for the reviews. Backport of ca74e563500e291480f1976b58fcd34aac768dca from master
2017-06-13[1.11.x] Refs #23853 -- Updated sql.query.Query.join() docstring.Tim Graham
Follow up to ab89414f40db1598364a7fe4cfac1766cacd2668. Backport of 7acbe89cc2a72f1b85d415c1cdb622c0dbbbe37c from master
2017-06-13[1.11.x] Fixed #28293 -- Fixed union(), intersection(), and difference() ↵Mariusz Felisiak
when combining with an EmptyQuerySet. Thanks Jon Dufresne for the report and Tim Graham for the review. Backport of 82175ead723f8fa3f9271fbd4b24275097029aab from master
2017-04-23[1.11.x] Fixed #28101 -- Fixed a regression with nested __in subquery ↵Simon Charette
lookups and to_field. Thanks Kristian Klette for the report and Tim for the help. Backport of 8ef35468b660e1c25af67a8299202b8bc108679f from master
2017-04-20[1.11.x] Fixed #28091 -- Re-raised original exception when closing cursor ↵François Freitag
cleanup fails
2017-01-31[1.11.x] Fixed #27800 -- Fixed QuerySet.annotate(Length(...)).distinct() crash.Lex Berezhny
Backport of ac5f886c5610a6bca26dab10170b445d1e9df450 from master
2017-01-25[1.11.x] Removed unused variables that are overwritten.Mads Jensen
Backport of ebf34c3cdcd2c75349c60a064427ac255958bf9b from master
2017-01-16Fixed #25307 -- Fixed QuerySet.annotate() crash with conditional expressions.Josh Smeaton
Thanks Travis Newport for the tests and Josh Smeaton for contributing to the patch.
2017-01-14Fixed #27718 -- Added QuerySet.union(), intersection(), difference().Florian Apolloner
Thanks Mariusz Felisiak for review and Oracle assistance. Thanks Tim Graham for review and writing docs.
2017-01-14Refs #16614 -- Prevented database errors from being masked by cursor close.François Freitag
When an error occurred during the cursor.execute statement, the cursor is closed. This operation did not fail with client-side cursors. Now, with server-side cursors, the close operation might fail (example below). The original error should be raised, not the one raised by cursor.close(), this is only clean-up code. For example, one can attempt to create a named cursor for an invalid query. psycopg will raise an error about the invalid query and the server-side cursor will not be created on PostgreSQL. When the code attempts to cursor.close(), it asks psycopg to close a cursor that was not created. pyscopg raises a new error: psycopg2.OperationalError: cursor "_django_curs_140365867840512_20" does not exist.
2017-01-11Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.François Freitag
Thanks to Josh Smeaton for the idea of implementing server-side cursors in PostgreSQL from the iterator method, and Anssi Kääriäinen and Kevin Turner for their previous work. Also Simon Charette and Tim Graham for review.
2016-12-29Removed unused enumerate.Florian Apolloner
2016-12-14Fixed #27594 -- Fixed select_related() with reverse self-referential ↵Daniel Hillier
OneToOneField. Fixed definition of `klass_info['from_parent']` so that two models aren't considered from a parent class if the model classes are the same.
2016-12-07Fixed #17002 -- Allowed using a ManyToManyField through model that inherits ↵InvalidInterrupt
another.
2016-12-01Fixed #27546 -- Removed hardcoded class names in __repr__() methods.Keda87
2016-10-28Fixed #20939 -- Simplified query generation by converting QuerySet to Query.Tim Graham
Thanks Anssi Kääriäinen for the initial patch and Anssi, Simon Charette, and Josh Smeaton for review.
2016-10-24Removed unused loop in Query.change_aliases().Tim Graham
Unknown if it was ever used.
2016-10-15Removed unused 'field' argument to DeleteQuery.delete_batch().Tim Graham
Unused since a170c3f755351beb35f8166ec3c7e9d524d9602d.
2016-10-14Tested QuerySet compatibility check.Tim Graham
cdfdcf4b70bebfc68871df885387790c6afbc23c missed this test.
2016-10-13Removed unused InsertQuery.clone().Tim Graham
Unknown if it was ever needed.
2016-10-13Removed unneeded try/except in Query.names_to_path().Tim Graham
2016-10-13Removed unused branch in SQLUpdateCompiler.as_sql().Tim Graham
Unknown if it was ever needed.
2016-10-13Removed unused branch in Query.change_aliases().Tim Graham
Unused since 0c7633178fa9410f102e4708cef979b873bccb76.
2016-10-13Removed unused EmptyResultSets in SQLCompilers.Tim Graham
Unused since ed1bcf05158acf4bf4e0189d477b6c762bd0133e.
2016-10-12Removed unused SubqueryConstraint.relabel_aliases() and clone() methods.Tim Graham
Unused since b68212f539f206679580afbfd008e7d329c9cd31.
2016-10-04Fixed #27193 -- Preserved ordering in select_for_update subqueries.François Freitag
2016-09-27Fixed #27268 -- Restored an invalid related field lookup error message in ↵Mariusz Felisiak
QuerySet filtering.
2016-09-27Removed unused branch in SQLCompiler.as_subquery_condition().Tim Graham
Unused since dcdc579d162b750ee3449e34efd772703592faca.
2016-09-17Made FieldError/FieldDoesNotExist messages uniform across Python versions.François Freitag
Removed possible u'' prefixes on Python 2.
2016-09-09Fixed #27062 -- Eased implementing select_for_update() on MSSQL.Mikhail Denisenko
2016-08-19Fixed #22288 -- Fixed F() expressions with the __range lookup.Matthew Wilkes
2016-08-16Fixed #24854 -- Refactored QuerySet._valuesIan Foote
Added django.db.models.sql.query.Query.set_values() method to handle query mutation.
2016-08-08Fixed #26500 -- Added SKIP LOCKED support to select_for_update().Simon Charette
Thanks Tim for the review.
2016-08-08Moved EmpytResultSet to django.core.exceptions.Johannes Dollinger
This removes the need for some inner imports.
2016-08-08Fixed #26517 -- Fixed ExpressionWrapper with empty queryset.Johannes Dollinger
2016-06-29Fixed #19513, #18580 -- Fixed crash on QuerySet.update() after annotate().David Sanders
2016-05-19Fixed #26515 -- Fixed Query.trim_joins() for nested ForeignObjects.darius BERNARD
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-04Fixed W503 flake8 warnings.Tim Graham
2016-03-28Sorted single letter imports per the latest version of isort.Tim Graham
2016-03-05Refs #19527 -- Fixed SQL compiler regression causing Oracle failure.Tim Graham
2016-03-02Refs #19527 -- Allowed QuerySet.bulk_create() to set the primary key of its ↵acrefoot
objects. PostgreSQL support only. Thanks Vladislav Manchev and alesasnouski for working on the patch.
2016-02-27Fixed #26230 -- Made default_related_name affect related_query_name.chenesan
2016-02-11Fixed #26196 -- Made sure __in lookups use to_field as default.Anssi Kääriäinen
Thanks Simon Charette for the test.