Writes multiple KV entries using the executor batch contract. Valid items share commit facts where the underlying engine applies them together.
Itemwise batches return one positional item result per input item. The outer batch status summarizes whether all, some, or none of the items succeeded.
Examples
Write many entries in one commit.
CLI
$ strata command run --command-json '{"entries":[{"key":"YQ==","value":"MQ=="},{"key":"Yg==","value":"Mg=="}],"type":"kv_batch_put"}'
$ strata command run --command-json '{"keys":["YQ==","Yg=="],"type":"kv_batch_get"}'
Wire
{"entries":[{"key":"YQ==","value":"MQ=="},{"key":"Yg==","value":"Mg=="}],"type":"kv_batch_put"}
{"keys":["YQ==","Yg=="],"type":"kv_batch_get"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
entries | BatchKvEntry[] | yes | Entries to write. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
BatchResult<KvMutationItem>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.kv_keyinvalid_argument.engine.kv_batchinvalid_argument.engine.kv_batch_duplicate_keyinvalid_argument.executor.kv_batch_duplicate_key
Invocation
- CLI: via
strata command run(no dedicated verb) - Wire type:
kv_batch_put