MCPcopy
hub / github.com/prisma/prisma / runQueryPostgres

Function runQueryPostgres

packages/migrate/src/utils/setupPostgres.ts:61–71  ·  view source on GitHub ↗
(options: Omit<SetupParams, 'dirname'>, query: string)

Source from the content-addressed store, hash-verified

59 * The given `options.connectionString` is used as is.
60 */
61export async function runQueryPostgres(options: Omit<SetupParams, 'dirname'>, query: string): Promise<void> {
62 const { connectionString } = options
63
64 // Connect to default db
65 const dbDefault = new Client({
66 connectionString,
67 })
68 await dbDefault.connect()
69 await dbDefault.query(query)
70 await dbDefault.end()
71}

Callers 3

MigrateDev.test.tsFile · 0.90
setupPostgresFunction · 0.85

Calls 3

endMethod · 0.80
connectMethod · 0.65
queryMethod · 0.45

Tested by

no test coverage detected