Returns a boolean status for one KV key without loading the stored value.
Status commands return a scalar or compact status payload and do not mutate database state.
Examples
Check whether a key currently has a visible value.
CLI
$ strata kv put k v
$ strata kv exists k
$ strata kv exists absent
Wire
{"key":"aw==","type":"kv_put","value":"dg=="}
{"key":"aw==","type":"kv_exists"}
{"key":"YWJzZW50","type":"kv_exists"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key | Bytes | yes | Key to check. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
StatusValue<bool>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.kv_key
Invocation
- CLI:
strata kv exists - Wire type:
kv_exists