Fixed #28652 -- Fixed a few comments in django/db/models/*.

This commit is contained in:
Дилян Палаузов 2017-10-02 11:14:08 -04:00 committed by Tim Graham
parent aba3467585
commit 5d9b736fd8
2 changed files with 3 additions and 4 deletions

View File

@ -256,7 +256,7 @@ class QuerySet:
""" """
The queryset iterator protocol uses three nested iterators in the The queryset iterator protocol uses three nested iterators in the
default case: default case:
1. sql.compiler:execute_sql() 1. sql.compiler.execute_sql()
- Returns 100 rows at time (constants.GET_ITERATOR_CHUNK_SIZE) - Returns 100 rows at time (constants.GET_ITERATOR_CHUNK_SIZE)
using cursor.fetchmany(). This part is responsible for using cursor.fetchmany(). This part is responsible for
doing some column masking, and returning the rows in chunks. doing some column masking, and returning the rows in chunks.
@ -438,7 +438,7 @@ class QuerySet:
# insert into the childmost table. # insert into the childmost table.
# We currently set the primary keys on the objects when using # We currently set the primary keys on the objects when using
# PostgreSQL via the RETURNING ID clause. It should be possible for # PostgreSQL via the RETURNING ID clause. It should be possible for
# Oracle as well, but the semantics for extracting the primary keys is # Oracle as well, but the semantics for extracting the primary keys is
# trickier so it's not done yet. # trickier so it's not done yet.
assert batch_size is None or batch_size > 0 assert batch_size is None or batch_size > 0
# Check that the parents share the same concrete model with the our # Check that the parents share the same concrete model with the our

View File

@ -1052,8 +1052,7 @@ class SQLCompiler:
raise raise
if result_type == CURSOR: if result_type == CURSOR:
# Caller didn't specify a result_type, so just give them back the # Give the caller the cursor to process and close.
# cursor to process (and close).
return cursor return cursor
if result_type == SINGLE: if result_type == SINGLE:
try: try: