diff options
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/compiler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 2b08b9d79e..279aa7a00f 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -1007,10 +1007,11 @@ class SQLCompiler: row[pos] = value yield row - def results_iter(self, results=None, tuple_expected=False): + def results_iter(self, results=None, tuple_expected=False, chunked_fetch=False, + chunk_size=GET_ITERATOR_CHUNK_SIZE): """Return an iterator over the results from executing this query.""" if results is None: - results = self.execute_sql(MULTI) + results = self.execute_sql(MULTI, chunked_fetch=chunked_fetch, chunk_size=chunk_size) fields = [s[0] for s in self.select[0:self.col_count]] converters = self.get_converters(fields) rows = chain.from_iterable(results) |
