Skip to content

pgListenNotify

function pgListenNotify(client, channel?): WatchSubscribe;

Defined in: storage/watch.ts:42

A WatchSubscribe source for Postgres LISTEN/NOTIFY: the database owns the trigger that pg_notifys channel with the changed key as payload; client is a dedicated listening connection.

Parameter Type Default value
client PgNotificationClient undefined
channel? string "xtandard_flags"

WatchSubscribe

const storage = withWatch(base, pgListenNotify(listener, "xtandard_flags"));