File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -553,37 +553,6 @@ The ``MongoClient.bulk_write()`` method returns a ``ClientBulkWriteResult`` obje
553553 * - ``upserted_count``
554554 - | The number of documents upserted, if any.
555555
556- Type Hints
557- ----------
558-
559- .. include:: /includes/type-hints/intro.rst
560-
561- When you use the ``bulk_write()`` method to perform an ``InsertOne`` or ``ReplaceOne``
562- operation,
563- The following code example shows how to insert
564- - ``~pymongo.collection.Collection.bulk_write()``
565-
566- For ``bulk_write()``, both the ``~pymongo.operations.InsertOne()`` and
567- ``~pymongo.operations.ReplaceOne()`` operators are generic.
568-
569- The following code example shows that the results are the same as the preceding examples
570- when you call the ``bulk_write()`` method:
571-
572- .. code-block:: python
573-
574- from typing import TypedDict
575- from pymongo import MongoClient
576- from pymongo.operations import InsertOne
577- from pymongo.collection import Collection
578- client: MongoClient = MongoClient()
579- collection: Collection[Movie] = client.test.test
580- inserted = collection.bulk_write([InsertOne(Movie(name="Jurassic Park", year=1993))])
581- result = collection.find_one({"name": "Jurassic Park"})
582- assert result is not None
583- assert result["year"] == 1993
584-
585- .. include:: /includes/type-hints/tip-more-info.rst
586-
587556Troubleshooting
588557---------------
589558
You can’t perform that action at this time.
0 commit comments