Function: withAdvisoryTransactionLock()
withAdvisoryTransactionLock<
T>(pool,key,fn):Promise<T>
Run fn in a transaction while holding a transaction advisory lock.
The lock is released atomically by COMMIT or ROLLBACK, making this the
right primitive for one-time schema installation and migrations.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”unknown
(client) => T | Promise<T>
Returns
Section titled “Returns”Promise<T>