Create the next batched client-level bulkWrite operation with OP_MSG, compressed.
(
command: Mapping[str, Any],
operations: list[tuple[str, Mapping[str, Any]]],
namespaces: list[str],
ack: bool,
opts: CodecOptions[Any],
ctx: _ClientBulkWriteContext,
)
| 1176 | |
| 1177 | |
| 1178 | def _client_batched_op_msg_compressed( |
| 1179 | command: Mapping[str, Any], |
| 1180 | operations: list[tuple[str, Mapping[str, Any]]], |
| 1181 | namespaces: list[str], |
| 1182 | ack: bool, |
| 1183 | opts: CodecOptions[Any], |
| 1184 | ctx: _ClientBulkWriteContext, |
| 1185 | ) -> tuple[int, bytes, list[Mapping[str, Any]], list[Mapping[str, Any]]]: |
| 1186 | """Create the next batched client-level bulkWrite operation |
| 1187 | with OP_MSG, compressed. |
| 1188 | """ |
| 1189 | data, to_send_ops, to_send_ns = _client_encode_batched_op_msg( |
| 1190 | command, operations, namespaces, ack, opts, ctx |
| 1191 | ) |
| 1192 | |
| 1193 | assert ctx.conn.compression_context is not None |
| 1194 | request_id, msg = _compress(2013, data, ctx.conn.compression_context) |
| 1195 | return request_id, msg, to_send_ops, to_send_ns |
| 1196 | |
| 1197 | |
| 1198 | def _client_batched_op_msg( |
no test coverage detected