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,
)
| 1249 | |
| 1250 | |
| 1251 | def _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 | |
| 1266 | if _use_c: |
no test coverage detected