MCPcopy
hub / github.com/prisma/prisma / createExecutor

Function createExecutor

packages/cli/src/Studio.ts:85–100  ·  view source on GitHub ↗
(connectionString)

Source from the content-addressed store, hash-verified

83const POSTGRES_STUDIO_STUFF: StudioStuff = {
84 adapter: 'postgres',
85 async createExecutor(connectionString) {
86 const postgresModule = await import('postgres')
87
88 const connectionURL = new URL(connectionString)
89
90 for (const queryParameter of PRISMA_ORM_SPECIFIC_QUERY_PARAMETERS) {
91 connectionURL.searchParams.delete(queryParameter)
92 }
93
94 const postgres = postgresModule.default(connectionURL.toString())
95
96 process.once('SIGINT', () => postgres.end())
97 process.once('SIGTERM', () => postgres.end())
98
99 return createPostgresJSExecutor(postgres)
100 },
101}
102
103type Database = { new (path: string): import('better-sqlite3').Database }

Callers

nothing calls this directly

Calls 9

deleteMethod · 0.80
endMethod · 0.80
catchMethod · 0.80
warnMethod · 0.80
closeMethod · 0.80
resolveFunction · 0.50
defaultMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected