Add this operation to the _AsyncClientBulk/_ClientBulk instance `bulkobj`.
(self, bulkobj: _AgnosticClientBulk)
| 700 | ) |
| 701 | |
| 702 | def _add_to_client_bulk(self, bulkobj: _AgnosticClientBulk) -> None: |
| 703 | """Add this operation to the _AsyncClientBulk/_ClientBulk instance `bulkobj`.""" |
| 704 | if not self._namespace: |
| 705 | raise InvalidOperation( |
| 706 | "MongoClient.bulk_write requires a namespace to be provided for each write operation" |
| 707 | ) |
| 708 | bulkobj.add_update( |
| 709 | self._namespace, |
| 710 | self._filter, |
| 711 | self._doc, |
| 712 | True, |
| 713 | self._upsert, |
| 714 | collation=validate_collation_or_none(self._collation), |
| 715 | array_filters=self._array_filters, |
| 716 | hint=self._hint, |
| 717 | ) |
| 718 | |
| 719 | |
| 720 | class IndexModel: |
nothing calls this directly
no test coverage detected