Add this operation to the _AsyncClientBulk/_ClientBulk instance `bulkobj`.
(self, bulkobj: _AgnosticClientBulk)
| 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 | |
| 641 | class UpdateMany(_UpdateOp): |
nothing calls this directly
no test coverage detected