MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / getDatabaseUrl

Function getDatabaseUrl

packages/database/src/database.ts:55–69  ·  view source on GitHub ↗
({
  dbUrl,
  cert,
}: {
  dbUrl?: string;
  cert?: string;
})

Source from the content-addressed store, hash-verified

53 * - if database url is missing, it will throw an exception
54 */
55export function getDatabaseUrl({
56 dbUrl,
57 cert,
58}: {
59 dbUrl?: string;
60 cert?: string;
61}) {
62 if (!dbUrl) return '';
63
64 const certLocation = createCertFile({ cert });
65 if (!certLocation) return dbUrl;
66
67 const join = dbUrl.indexOf('?') > -1 ? '&' : '?';
68 return dbUrl + `${join}ssl=true&sslrootcert=${certLocation}`;
69}

Callers 3

prisma.tsFile · 0.90
runWorkerFunction · 0.90
createInstanceMethod · 0.90

Calls 1

createCertFileFunction · 0.85

Tested by

no test coverage detected