PgPubSub.once() method

Sets 'connect' event handler, which fired only one single time

Signature:

once(event: 'connect', listener: typeof connect): this;

Parameters

Parameter

Type

Description

event

'connect'

'connect' — a PostgreSQL connection has been established

listener

typeof connect

handler invoked when a PostgreSQL connection has been established. Fires at most once.

Returns:

this

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.