feat: expose core identity transport
This commit is contained in:
@@ -60,6 +60,12 @@ export function createIdentityDrizzleDatabase(
|
||||
}
|
||||
|
||||
const pool = new Pool(poolConfig);
|
||||
// pg's own documentation requires an error listener on the pool: an idle client can be
|
||||
// terminated by the server (for example, its backend is killed, or the network drops) after
|
||||
// being returned to the pool, and the pool surfaces that as an 'error' event on itself rather
|
||||
// than on any in-flight query. Without a listener, that event is an unhandled Node.js error and
|
||||
// can crash the process even though no caller is doing anything wrong at the time.
|
||||
pool.on("error", () => undefined);
|
||||
const db = drizzle(pool, { schema: identityAdapterSchema });
|
||||
|
||||
return Object.freeze({
|
||||
|
||||
Reference in New Issue
Block a user