event

batch_append

Append multiple events in one commit.

db.events.append_many(entries: 'Any') -> 'BatchResult'

wire event_batch_append

Appends multiple events to the selected branch and space in one engine commit. Sequences are assigned in entry order. Entries that fail validation report a positional item error while valid entries still append.

Itemwise batches return one positional item result per input item. The outer batch status summarizes whether all, some, or none of the items succeeded.

To see the complete help for this command, run:

help(db.events.append_many)

Example

Append many events in one commit.

_ = db.events.append_many([{"event_type": "user.created", "payload": {"id": 1}}, {"event_type": "user.updated", "payload": {"id": 2}}])db.events.len()

Parameters

NameTypeRequiredDescription
entriesarrayyesEvents to append.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

BatchResult<EventBatchAppendItem>

  • dataBatchResult9
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 10 Events commands

agents: this page as markdown → /docs/reference/event/batch_append.md