Skip to main content

@idpass/data-collect-core / withClient

Function: withClient()

withClient<T>(pool, fn): Promise<T>

Defined in: db/connection.ts:51

Acquires a client from the pool, executes the callback, and releases the client.

Type Parameters​

T​

T

Parameters​

pool​

Pool

fn​

(client) => Promise<T>

Returns​

Promise<T>