Jon Dufresne
21046e7773
Fixed #28249 -- Removed unnecessary dict.keys() calls.
...
iter(dict) is equivalent to iter(dict.keys()).
2017-05-27 19:08:46 -04:00
Tom
7afb476469
Fixed #28226 -- Replaced use of str.join() with concatenation.
2017-05-27 13:59:05 -04:00
Alex
37ab3c3f9d
Fixed #28222 -- Allowed settable properties in QuerySet.update_or_create()/get_or_create() defaults.
2017-05-27 12:41:38 -04:00
Mariusz Felisiak
99df304c85
Fixed #28206 -- Fixed RawQuerySet crash on a model with a mixed case db_column pk on Oracle.
...
Thanks Tim Graham for the review.
2017-05-18 19:11:23 +02:00
François Freitag
88336fdbb5
Fixed #28062 -- Added a setting to disable server-side cursors on PostgreSQL.
...
When a connection pooler is set up in transaction pooling mode, queries
relying on server-side cursors fail. The DISABLE_SERVER_SIDE_CURSORS
setting in DATABASES disables server-side cursors for this use case.
2017-05-06 06:59:04 -04:00
François Freitag
c0a2b9508a
Fixed #27554 -- Fixed prefetch_related() crash when fetching relations in nested Prefetches.
2017-05-04 09:17:29 -04:00
Simon Charette
c9159a082e
Refs #20939 -- Removed the Query._prepare_as_filter_value() hack.
2017-04-25 23:43:33 -04:00
Simon Charette
ec50937bcb
Refs #20939 -- Removed the Query._forced_pk hack.
2017-04-25 23:43:33 -04:00
Claude Paroz
43b4a1618e
Fixed #28096 -- Allowed prefetch calls with ModelIterable subclasses
...
Regression in 7ec330eeb9
.
Thanks Tim Graham for the review.
2017-04-19 19:32:46 +02:00
Mads Jensen
ed0cbc8d8b
Refs #23919 -- Removed some Python 2 compatibility code and comments.
2017-03-27 13:12:27 -04:00
Mariusz Felisiak
1b6f05e91f
Fixed #21160 -- Fixed QuerySet.in_bulk() crash on SQLite when requesting more than 999 ids.
...
Thanks Andrei Picus and Anssi Kääriäinen for the initial patch
and Tim Graham for the review.
2017-03-27 18:43:40 +02:00
Anton Samarchyan
60e52a047e
Refs #27656 -- Updated django.db docstring verbs according to PEP 257.
2017-02-28 09:17:27 -05:00
Tim Graham
29f607927f
Fixed spelling of "nonexistent".
2017-02-03 08:01:45 -05:00
Vytis Banaitis
8838d4dd49
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
2017-02-01 11:41:56 -05:00
Claude Paroz
6e55e1d88a
Refs #23919 -- Replaced six.reraise by raise
2017-01-22 20:08:04 +01:00
Simon Charette
4c5ed3e683
Refs #23919 -- Removed __nonzero__() methods (for Python 2).
...
Thanks Tim for the review.
2017-01-19 11:26:26 -05:00
Simon Charette
cecc079168
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 08:39:46 +01:00
Claude Paroz
2b281cc35e
Refs #23919 -- Removed most of remaining six usage
...
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Tim Graham
b70094f040
Refs #26226 -- Removed support for related manager classes without a _apply_rel_filters() method.
...
Per deprecation timeline.
2017-01-17 20:52:03 -05:00
Florian Apolloner
84c1826ded
Fixed #27718 -- Added QuerySet.union(), intersection(), difference().
...
Thanks Mariusz Felisiak for review and Oracle assistance.
Thanks Tim Graham for review and writing docs.
2017-01-14 08:32:07 -05:00
François Freitag
f3b7c05936
Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.
...
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.
2017-01-11 09:25:37 -05:00
Adam Chainz
8d94d575f8
Used @cached_property in RawQuerySet.
2016-12-23 10:12:48 -05:00
Adam Chainz
6ebf8f9057
Refs #27624 -- Made QuerySet._prefetch_related_lookups immutable.
2016-12-23 09:58:22 -05:00
Keda87
48826aa541
Fixed #27546 -- Removed hardcoded class names in __repr__() methods.
2016-12-01 08:11:09 -05:00
Adam Chainz
e044026dce
Fixed #27499 -- Made Prefetches pickle without evaluating their QuerySet.
2016-11-23 11:23:14 -05:00
Tim Graham
2e5fbe889f
Cleaned up some __getstate__() docstrings.
2016-11-23 09:45:21 -05:00
Tim Graham
1bc249c2a6
Fixed #20939 -- Simplified query generation by converting QuerySet to Query.
...
Thanks Anssi Kääriäinen for the initial patch and Anssi, Simon Charette,
and Josh Smeaton for review.
2016-10-28 11:20:23 -04:00
David Barragán Merino
b3bd3aa07c
Fixed #27385 -- Fixed QuerySet.bulk_create() on PostgreSQL when the number of objects is a multiple plus one of batch_size.
2016-10-25 19:21:08 -04:00
Tim Graham
50864b402b
Removed unused branch in ModelIterable.__iter__().
...
Unknown if it was ever used.
2016-10-15 10:19:47 -04:00
Tim Graham
274b227796
Removed DatabaseFeatures.can_combine_inserts_with_and_without_auto_increment_pk.
...
Unused (always False) after 29132ebdef
.
2016-10-14 17:18:28 -04:00
Tim Graham
8997750c43
Removed unused QuerySet.value_annotation attribute.
...
Unused since 5008a4db44
.
2016-10-14 16:46:37 -04:00
François Freitag
1db1f74617
Refs #27118 -- Reallowed using pk in QuerySet.get/update_or_create().
2016-10-04 10:10:39 -04:00
François Freitag
a5e13a0b92
Fixed #27118 -- Made QuerySet.get_or_create()/update_or_create() error for a non-field in their arguments.
2016-09-24 20:16:16 -04:00
Tim Graham
f4bde7d9a1
Removed unused Prefetch.get_current_prefetch_through().
...
Unused since its introduction in f51c1f5900
.
2016-09-23 17:11:15 -04:00
Berker Peksag
3c97ba2a0d
Replaced property() usage with decorator in a couple places.
2016-08-24 17:23:16 -04:00
Ian Foote
39f35d4b9d
Fixed #25871 -- Added expressions support to QuerySet.values().
2016-08-18 16:05:15 -04:00
Ian Foote
698be78d74
Fixed #24854 -- Refactored QuerySet._values
...
Added django.db.models.sql.query.Query.set_values() method to handle
query mutation.
2016-08-16 10:03:40 +10:00
Simon Charette
b8e6e1b43b
Fixed #26500 -- Added SKIP LOCKED support to select_for_update().
...
Thanks Tim for the review.
2016-08-08 12:01:43 -04:00
Sjoerd Job Postmus
3246d2b4bb
Fixed #27026 -- Fixed state initialization of bulk_create() objects if can_return_ids_from_bulk_insert.
2016-08-06 10:24:57 -04:00
Simon Charette
271bfe65d9
Fixed #26916 -- Fixed prefetch_related when using a cached_property as to_attr.
...
Thanks Trac alias karyon for the report and Tim for the review.
2016-07-19 16:05:07 -04:00
Jensen Cochran
d44afd8892
Fixed #26804 -- Fixed a race condition in QuerySet.update_or_create().
2016-07-14 12:10:19 -04:00
Kenneth
841cb45847
Fixed #26884 -- Evaluated callables in QuerySet.update_or_create()'s defaults when updating.
2016-07-12 22:09:53 -04:00
David Sanders
a84344bc53
Fixed #19513 , #18580 -- Fixed crash on QuerySet.update() after annotate().
2016-06-29 14:08:13 -04:00
Will Koster
9899347641
Fixed #26638 -- Allowed callable arguments for QuerySet.get_or_create()/update_or_create() defaults.
2016-06-03 10:00:53 -04:00
Simon Charette
53a5fb3cc0
Fixed #26676 -- Prevented prefetching to_attr from caching its result in through attr.
...
Thanks Ursidours for the report.
2016-05-31 14:32:58 -04:00
Josh Smeaton
2a4af0ea43
Fixed #25774 -- Refactor datetime expressions into public API
2016-05-18 20:14:58 +10:00
Tim Graham
3642835bde
Removed redundant code in QuerySet._batched_insert().
2016-05-14 06:42:50 -04:00
Simon Charette
7ec330eeb9
Refs #26565 -- Errored nicely when using Prefetch with a values() queryset.
...
Thanks Maxime Lorant for the report and Anssi for the suggestion.
2016-05-03 09:28:31 -04:00
Anssi Kääriäinen
7f51876f99
Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading.
2016-04-29 13:06:32 -04:00