kv
delete
Delete one visible KV key.
strata kv deletedb.kv.delete(key: 'str | bytes') -> 'Any'wire kv_delete
Deletes the current visible value for a KV key. Missing keys produce a no-op delete acknowledgement rather than a read-style missing value.
Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.
To see the complete help for this command, run:
strata kv delete --helphelp(db.kv.delete)
Example
Delete a key; it is no longer visible afterward.
strata kv put temp scratchstrata kv delete tempstrata kv exists temp
_ = db.kv.put("temp", "scratch")_ = db.kv.delete("temp")db.kv.exists("temp")
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| key | Bytes | yes | Key bytes. |
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
| space | string or null | no | Target product space. Defaults to `"default"`. |
Returns
MutationAck<KvDelete>
- dataobject
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.product_space | never | not_started |
| invalid_argument.engine.kv_key | never | not_started |