MCPcopy
hub / github.com/CapSoftware/Cap / db

Function db

packages/database/index.ts:18–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16let _cached: ReturnType<typeof createDrizzle> | undefined;
17
18export const db = () => {
19 if (!_cached) {
20 _cached = createDrizzle();
21
22 instrumentDrizzleClient(_cached);
23 }
24 return _cached;
25};
26
27// Use the incoming value if one exists, else fallback to the DBs existing value.
28export const updateIfDefined = <T>(v: T | undefined, col: AnyMySqlColumn) =>

Callers 15

DatabaseClass · 0.90
runMigrateFunction · 0.90
decodeSessionTokenFunction · 0.90
adapterFunction · 0.90
signInFunction · 0.90
jwtFunction · 0.90
backfillVideoOrgIdsFunction · 0.90
validateBackfillFunction · 0.90
getInitialStatsFunction · 0.90
proxyFunction · 0.90

Calls 1

createDrizzleFunction · 0.85

Tested by

no test coverage detected