Removed DatabaseFeatures.can_combine_inserts_with_and_without_auto_increment_pk.

Unused (always False) after 29132ebdef.
This commit is contained in:
Tim Graham 2016-10-14 17:18:28 -04:00
parent 8997750c43
commit 274b227796
3 changed files with 12 additions and 18 deletions

View File

@ -28,7 +28,6 @@ class BaseDatabaseFeatures(object):
has_bulk_insert = False
uses_savepoints = False
can_release_savepoints = False
can_combine_inserts_with_and_without_auto_increment_pk = False
# If True, don't use integer foreign keys referring to, e.g., positive
# integer primary keys.

View File

@ -25,7 +25,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_1000_query_parameters = False
supports_mixed_date_datetime_comparisons = False
has_bulk_insert = True
can_combine_inserts_with_and_without_auto_increment_pk = False
supports_foreign_keys = False
supports_column_check_constraints = False
autocommits_when_autocommit_is_off = True

View File

@ -440,10 +440,6 @@ class QuerySet(object):
objs = list(objs)
self._populate_pk_values(objs)
with transaction.atomic(using=self.db, savepoint=False):
if (connection.features.can_combine_inserts_with_and_without_auto_increment_pk and
self.model._meta.has_auto_field):
self._batched_insert(objs, fields, batch_size)
else:
objs_with_pk, objs_without_pk = partition(lambda o: o.pk is None, objs)
if objs_with_pk:
self._batched_insert(objs_with_pk, fields, batch_size)