kv
history
Read retained version history for one KV key.
strata kv historydb.kv.history(key: 'str | bytes') -> 'Optional[list]'wire kv_history
Returns retained history rows for a KV key when history is available. Missing or unavailable history maps to an optional-read result.
Optional reads distinguish present data from missing data. When version or timestamp facts exist on the executor output, SDK mappings should preserve them.
To see the complete help for this command, run:
strata kv history --helphelp(db.kv.history)
Example
A key that never existed has no history.
strata kv history absentdb.kv.history("absent") is NoneParameters
| Name | Type | Required | Description |
|---|---|---|---|
| key | Bytes | yes | Key to read. |
| 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
Maybe<Vec<HistoryItem>>
- dataany
- 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 |