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

Function _encode_batched_write_command

pymongo/message.py:1251–1263  ·  view source on GitHub ↗

Encode the next batched insert, update, or delete command.

(
    namespace: str,
    operation: int,
    command: MutableMapping[str, Any],
    docs: list[Mapping[str, Any]],
    opts: CodecOptions[Any],
    ctx: _BulkWriteContext,
)

Source from the content-addressed store, hash-verified

1249
1250
1251def _encode_batched_write_command(
1252 namespace: str,
1253 operation: int,
1254 command: MutableMapping[str, Any],
1255 docs: list[Mapping[str, Any]],
1256 opts: CodecOptions[Any],
1257 ctx: _BulkWriteContext,
1258) -> tuple[bytes, list[Mapping[str, Any]]]:
1259 """Encode the next batched insert, update, or delete command."""
1260 buf = _BytesIO()
1261
1262 to_send, _ = _batched_write_command_impl(namespace, operation, command, docs, opts, ctx, buf)
1263 return buf.getvalue(), to_send
1264
1265
1266if _use_c:

Callers 1

batch_commandMethod · 0.85

Calls 1

Tested by

no test coverage detected