mirror of
https://github.com/django/django.git
synced 2025-05-02 13:14:38 +00:00
Fixed grammar in sqlite's DatabaseOperations.bulk_batch_size()'s docstring.
This commit is contained in:
parent
c238da8942
commit
eb42d8d5d9
@ -20,8 +20,8 @@ class DatabaseOperations(BaseDatabaseOperations):
|
|||||||
SQLite has a compile-time default (SQLITE_LIMIT_VARIABLE_NUMBER) of
|
SQLite has a compile-time default (SQLITE_LIMIT_VARIABLE_NUMBER) of
|
||||||
999 variables per query.
|
999 variables per query.
|
||||||
|
|
||||||
If there is just single field to insert, then we can hit another
|
If there's only a single field to insert, the limit is 500
|
||||||
limit, SQLITE_MAX_COMPOUND_SELECT which defaults to 500.
|
(SQLITE_MAX_COMPOUND_SELECT).
|
||||||
"""
|
"""
|
||||||
limit = 999 if len(fields) > 1 else 500
|
limit = 999 if len(fields) > 1 else 500
|
||||||
return (limit // len(fields)) if len(fields) > 0 else len(objs)
|
return (limit // len(fields)) if len(fields) > 0 else len(objs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user