event
append
Append one event to the branch event log.
strata event appenddb.events.append(event_type: 'str', payload: 'Any') -> 'Any'wire event_append
Appends one event to the selected branch and space. Strata assigns the next sequence number, stamps the event with its append timestamp, and links it into the tamper-evident hash chain. Events are immutable once appended.
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 event append --helphelp(db.events.append)
Example
Append an event to the log.
strata event append user.created {"id":1}strata event count
_ = db.events.append("user.created", {"id": 1})db.events.len()
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| event_type | string | yes | Event type. |
| payload | any | yes | Event payload. |
| 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<EventAppend>
- 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.event_type | never | not_started |
| invalid_argument.engine.event_payload | never | not_started |
| invalid_argument.engine.event_payload_too_large | never | not_started |