MCPcopy Create free account
hub / github.com/denodrivers/postgres / poolWrapper

Function poolWrapper

tests/query_client_test.ts:35–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 }
34
35 async function poolWrapper() {
36 const pool = new Pool(getMainConfiguration(config), 1);
37 let client;
38 try {
39 client = await pool.connect();
40 await t(client);
41 } finally {
42 client?.release();
43 await pool.end();
44 }
45 }
46
47 return async (test: Deno.TestContext) => {
48 await test.step({ fn: clientWrapper, name: "Client" });

Callers

nothing calls this directly

Calls 5

connectMethod · 0.95
endMethod · 0.95
getMainConfigurationFunction · 0.90
releaseMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected