Deletes multiple KV keys and returns one positional mutation result per key. Missing keys are represented as no-op item results.
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
Delete many keys 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_delete"}'
$ strata command run --command-json '{"keys":["YQ==","Yg=="],"type":"kv_batch_exists"}'
Wire
{"entries":[{"key":"YQ==","value":"MQ=="},{"key":"Yg==","value":"Mg=="}],"type":"kv_batch_put"}
{"keys":["YQ==","Yg=="],"type":"kv_batch_delete"}
{"keys":["YQ==","Yg=="],"type":"kv_batch_exists"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
keys | Bytes[] | yes | Keys to delete. |
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_delete