summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2021-03-25 10:44:25 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-25 17:46:22 +0100
commitcac9ec73db35a6d38d33f271f4724da486c60e9f (patch)
tree2ab8cc9dc2a9727a63be6700970689332f06238b /docs
parentff514309e178e3955012050ead9b8fc66dc21a5b (diff)
Refs #31003 -- Moved note about return value of QuerySet.bulk_create() to the first paragraph.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index add56ca4fd..e874211a54 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -2157,9 +2157,9 @@ exists in the database, an :exc:`~django.db.IntegrityError` is raised.
This method inserts the provided list of objects into the database in an
efficient manner (generally only 1 query, no matter how many objects there
-are)::
+are), and returns created objects as a list, in the same order as provided::
- >>> Entry.objects.bulk_create([
+ >>> objs = Entry.objects.bulk_create([
... Entry(headline='This is a test'),
... Entry(headline='This is only a test'),
... ])
@@ -2210,8 +2210,6 @@ normally supports it).
.. _MySQL documentation: https://dev.mysql.com/doc/refman/en/sql-mode.html#ignore-strict-comparison
.. _MariaDB documentation: https://mariadb.com/kb/en/ignore/
-Returns ``objs`` as cast to a list, in the same order as provided.
-
``bulk_update()``
~~~~~~~~~~~~~~~~~