MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _add_to_client_bulk

Method _add_to_client_bulk

pymongo/operations.py:622–638  ·  view source on GitHub ↗

Add this operation to the _AsyncClientBulk/_ClientBulk instance `bulkobj`.

(self, bulkobj: _AgnosticClientBulk)

Source from the content-addressed store, hash-verified

620 )
621
622 def _add_to_client_bulk(self, bulkobj: _AgnosticClientBulk) -> None:
623 """Add this operation to the _AsyncClientBulk/_ClientBulk instance `bulkobj`."""
624 if not self._namespace:
625 raise InvalidOperation(
626 "MongoClient.bulk_write requires a namespace to be provided for each write operation"
627 )
628 bulkobj.add_update(
629 self._namespace,
630 self._filter,
631 self._doc,
632 False,
633 self._upsert,
634 collation=validate_collation_or_none(self._collation),
635 array_filters=self._array_filters,
636 hint=self._hint,
637 sort=self._sort,
638 )
639
640
641class UpdateMany(_UpdateOp):

Callers

nothing calls this directly

Calls 3

InvalidOperationClass · 0.90
add_updateMethod · 0.45

Tested by

no test coverage detected