PgNotifyProvider
PgNotifyProvider =
object
Defined in: packages/postgres/src/notify-provider/notify-provider.pg.ts:7
PostgreSQL notify provider interface.
Abstracts PostgreSQL LISTEN/NOTIFY operations. The provider manages connections internally - no explicit context management required.
Properties
Section titled “Properties”close?
Section titled “close?”
optionalclose?: () =>Promise<void>
Defined in: packages/postgres/src/notify-provider/notify-provider.pg.ts:30
Releases provider-owned resources (e.g. a dedicated LISTEN client).
Optional — pass-through providers (user-owned pool/client) can omit it.
When defined, must be idempotent: the second call is a no-op, and after
close publish and subscribe reject.
Returns
Section titled “Returns”Promise<void>
publish
Section titled “publish”publish: (
channel,message) =>Promise<void>
Defined in: packages/postgres/src/notify-provider/notify-provider.pg.ts:12
Publishes a message to a channel. Internally acquires a connection, publishes, and releases.
Parameters
Section titled “Parameters”channel
Section titled “channel”string
message
Section titled “message”string
Returns
Section titled “Returns”Promise<void>
subscribe
Section titled “subscribe”subscribe: (
channel,onMessage) =>Promise<() =>Promise<void>>
Defined in: packages/postgres/src/notify-provider/notify-provider.pg.ts:19
Subscribes to a channel. The provider manages a dedicated listen connection internally. Returns an unsubscribe function.
Parameters
Section titled “Parameters”channel
Section titled “channel”string
onMessage
Section titled “onMessage”(message) => void
Returns
Section titled “Returns”Promise<() => Promise<void>>