Encode the next batched client-level bulkWrite operation as OP_MSG.
(
command: Mapping[str, Any],
operations: list[tuple[str, Mapping[str, Any]]],
namespaces: list[str],
ack: bool,
opts: CodecOptions[Any],
ctx: _ClientBulkWriteContext,
)
| 1157 | |
| 1158 | |
| 1159 | def _client_encode_batched_op_msg( |
| 1160 | command: Mapping[str, Any], |
| 1161 | operations: list[tuple[str, Mapping[str, Any]]], |
| 1162 | namespaces: list[str], |
| 1163 | ack: bool, |
| 1164 | opts: CodecOptions[Any], |
| 1165 | ctx: _ClientBulkWriteContext, |
| 1166 | ) -> tuple[bytes, list[Mapping[str, Any]], list[Mapping[str, Any]]]: |
| 1167 | """Encode the next batched client-level bulkWrite |
| 1168 | operation as OP_MSG. |
| 1169 | """ |
| 1170 | buf = _BytesIO() |
| 1171 | |
| 1172 | to_send_ops, to_send_ns, _ = _client_batched_op_msg_impl( |
| 1173 | command, operations, namespaces, ack, opts, ctx, buf |
| 1174 | ) |
| 1175 | return buf.getvalue(), to_send_ops, to_send_ns |
| 1176 | |
| 1177 | |
| 1178 | def _client_batched_op_msg_compressed( |
no test coverage detected