MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / getWorkerDb

Function getWorkerDb

packages/db/src/client.ts:45–52  ·  view source on GitHub ↗
(connectionString: string, options: GetWorkerDbOptions = {})

Source from the content-addressed store, hash-verified

43 * Return a fresh wrapper per call so request/DO-bound I/O state never crosses contexts.
44 */
45export function getWorkerDb(connectionString: string, options: GetWorkerDbOptions = {}) {
46 const pool = new pg.Pool({
47 connectionString,
48 max: 1,
49 ...options,
50 });
51 return drizzle(pool, { schema });
52}
53
54export type WorkerDb = ReturnType<typeof getWorkerDb>;
55

Callers 15

findKiloUserPepperFunction · 0.90
client.test.tsFile · 0.90
getDbForCallMethod · 0.90
processReceiptCheckFunction · 0.90
dispatchPushMethod · 0.90
htmlDeployHandlerFunction · 0.90
findUserByIdFunction · 0.90

Calls

no outgoing calls

Tested by 1

buildQueryFunction · 0.72