Function: withAdvisoryLock()
withAdvisoryLock<
T>(pool,key,fn):Promise<T>
Hold a session advisory lock for the duration of fn.
The callback receives the dedicated PoolClient that owns the lock. Use it
for any operation that must be protected by the lock.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”unknown
(client) => T | Promise<T>
Returns
Section titled “Returns”Promise<T>