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

Function _batched_op_msg_compressed

pymongo/message.py:858–873  ·  view source on GitHub ↗

Create the next batched insert, update, or delete operation with OP_MSG, compressed.

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

Source from the content-addressed store, hash-verified

856
857
858def _batched_op_msg_compressed(
859 operation: int,
860 command: Mapping[str, Any],
861 docs: list[Mapping[str, Any]],
862 ack: bool,
863 opts: CodecOptions[Any],
864 ctx: _BulkWriteContext,
865) -> tuple[int, bytes, list[Mapping[str, Any]]]:
866 """Create the next batched insert, update, or delete operation
867 with OP_MSG, compressed.
868 """
869 data, to_send = _encode_batched_op_msg(operation, command, docs, ack, opts, ctx)
870
871 assert ctx.conn.compression_context is not None
872 request_id, msg = _compress(2013, data, ctx.conn.compression_context)
873 return request_id, msg, to_send
874
875
876def _batched_op_msg(

Callers 1

_do_batched_op_msgFunction · 0.85

Calls 2

_encode_batched_op_msgFunction · 0.85
_compressFunction · 0.85

Tested by

no test coverage detected