SQLiteEventBridge writes events into a SQLite table and polls for newly inserted rows.
Constructor params
path: SQLite database file pathtable: table name (defaultabxbus_events)poll_interval: polling interval in seconds (default0.25)name: optional bridge label
- Python
- TypeScript
Setup with a bus
- Python
- TypeScript
Behavior
emit(...)upserts event payload fields into the configured table.on(...)auto-starts polling and registers handlers on the internal bus.- Columns are created on demand only for
event_*fields. - The full event JSON is stored in
event_payload(not just non-event_*fields). event_*columns are also stored as flat mirrored fields for indexing/querying.- Writes use SQLite JSON functions for
event_payload(for examplejson(?)). - Rehydration merges
event_payloadwithevent_*column values back into a flat event object. - Rows are read in
(event_created_at, event_id)order, converted back to events, reset, and emitted locally. - Runtime notes: Python uses stdlib
sqlite3; TypeScript requires Node.js with built-innode:sqlite(Node 22+).