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

Method _execute_batch

pymongo/synchronous/client_bulk.py:421–431  ·  view source on GitHub ↗

Executes a batch of bulkWrite server commands (ack).

(
        self,
        bwc: _ClientBulkWriteContext,
        cmd: dict[str, Any],
        ops: list[tuple[str, Mapping[str, Any]]],
        namespaces: list[str],
    )

Source from the content-addressed store, hash-verified

419 return to_send_ops, to_send_ns
420
421 def _execute_batch(
422 self,
423 bwc: _ClientBulkWriteContext,
424 cmd: dict[str, Any],
425 ops: list[tuple[str, Mapping[str, Any]]],
426 namespaces: list[str],
427 ) -> tuple[dict[str, Any], list[Mapping[str, Any]], list[Mapping[str, Any]]]:
428 """Executes a batch of bulkWrite server commands (ack)."""
429 request_id, msg, to_send_ops, to_send_ns = bwc.batch_command(cmd, ops, namespaces)
430 result = self.write_command(bwc, cmd, request_id, msg, to_send_ops, to_send_ns, self.client) # type: ignore[arg-type]
431 return result, to_send_ops, to_send_ns # type: ignore[return-value]
432
433 def _process_results_cursor(
434 self,

Callers 1

_execute_commandMethod · 0.95

Calls 2

write_commandMethod · 0.95
batch_commandMethod · 0.45

Tested by

no test coverage detected