MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / getDatabaseSchema

Function getDatabaseSchema

apps/webapp/app/db.server.ts:205–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203});
204
205function getDatabaseSchema() {
206 if (!isValidDatabaseUrl(env.DATABASE_URL)) {
207 throw new Error("Invalid Database URL");
208 }
209
210 const databaseUrl = new URL(env.DATABASE_URL);
211 const schemaFromSearchParam = databaseUrl.searchParams.get("schema");
212
213 if (!schemaFromSearchParam) {
214 console.debug("❗ database schema unspecified, will default to `public` schema");
215 return "public";
216 }
217
218 return schemaFromSearchParam;
219}
220
221export const DATABASE_SCHEMA = singleton("DATABASE_SCHEMA", getDatabaseSchema);
222

Callers

nothing calls this directly

Calls 3

isValidDatabaseUrlFunction · 0.90
debugMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…