event
exists
Check whether an event sequence exists.
strata event existsdb.events.exists(sequence: 'int') -> 'bool'wire event_exists
Checks whether one event sequence exists in the selected branch and space without returning the record.
Status commands return a scalar or compact status payload and do not mutate database state.
To see the complete help for this command, run:
strata event exists --helphelp(db.events.exists)
Example
Check whether an event sequence exists.
strata event append user.created {"id":1}strata event exists 0strata event exists 999
_ = db.events.append("user.created", {"id": 1})db.events.exists(0)db.events.exists(999)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| sequence | integer | yes | Event sequence. |
| 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
StatusValue<bool>
- databoolean
- 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 |