A table can tell the rest of your system when its records change. Two switches control that, plus one for changes that don’t come through the API. All three are in the table’s Settings → Behaviour.

Events (server-side reactions)

With events on, every successful create, update or delete publishes an event whose payload is the record:
The event carries: its name (orders.created), a payload with the resource (orders), the change (created) and the whole record, an id, a source, the actor, and the time it occurred. A subscription can then run a flow or publish to a channel; an outbound webhook can send it to another system. This is how you send a receipt when an order is created without adding code to the place that creates orders. Turn events off for high-volume tables that never drive automation (logs, metrics), to save work.

Realtime (live screens)

With Broadcast changes on, your app subscribes to resource:<table>. Each person receives only the changes to rows their read rule allows, so a live list is as safe as a normal read. See Live records.

Capture (changes outside the API)

By default only writes through the API (your app, a route, a flow, the table editor) announce themselves. A write made with raw SQL, by another service sharing the database, or by a migration does not. Turn on Capture changes made outside the API and Pawabase installs database triggers so every change is announced, wherever it came from. Events and realtime then originate from the database. Use it when:
  • Another system writes to the same tables.
  • You run bulk fixes in the SQL editor and want screens to update.
  • You want an audit trail that nothing can skip.
It adds a little work to each write and needs PostgreSQL.

A pipeline example

  1. orders.create is allowed for signed-in users.
  2. Events on: orders.created fires.
  3. A subscription runs the send-receipt flow; a webhook tells the warehouse.
  4. Realtime on: the person’s open “My orders” screen adds the new row.
  5. Nothing in your app code mentions receipts, the warehouse, or the live screen.

Bulk imports and noise

An import of 10,000 rows would fire 10,000 events. The import wizard has a switch for this, off by default: Run events, flows and realtime for each row. See Import and export.

Events

React to them.

Live records

Update screens live.