From f3b7c059367a4e82bbfc7e4f0d42b10975e79f0c Mon Sep 17 00:00:00 2001 From: François Freitag Date: Fri, 3 Jun 2016 15:31:21 -0700 Subject: Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- django/test/testcases.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'django/test') diff --git a/django/test/testcases.py b/django/test/testcases.py index 4538716ce7..8203a3837d 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -175,6 +175,7 @@ class SimpleTestCase(unittest.TestCase): for alias in connections: connection = connections[alias] connection.cursor = _CursorFailure(cls.__name__, connection.cursor) + connection.chunked_cursor = _CursorFailure(cls.__name__, connection.chunked_cursor) @classmethod def tearDownClass(cls): @@ -182,6 +183,7 @@ class SimpleTestCase(unittest.TestCase): for alias in connections: connection = connections[alias] connection.cursor = connection.cursor.wrapped + connection.chunked_cursor = connection.chunked_cursor.wrapped if hasattr(cls, '_cls_modified_context'): cls._cls_modified_context.disable() delattr(cls, '_cls_modified_context') -- cgit v1.3