pgListenNotify
function pgListenNotify(client, channel?): WatchSubscribe;Defined in: src/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.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
client |
PgNotificationClient |
undefined |
channel? |
string |
"xtandard_webhooks" |
Returns
Section titled “Returns”WatchSubscribe
Example
Section titled “Example”const storage = withWatch(base, pgListenNotify(listener, "xtandard_webhooks"));