MCPcopy
hub / github.com/prisma/prisma / inspectMongo

Function inspectMongo

packages/migrate/src/utils/setupMongo.ts:29–40  ·  view source on GitHub ↗
(options: SetupParams)

Source from the content-addressed store, hash-verified

27}
28
29export async function inspectMongo(options: SetupParams): Promise<any> {
30 const { connectionString, dirname } = options
31
32 const db = mongo.createConnection(connectionString)
33
34 const inspectPath = path.join(dirname, 'setup')
35 const { inspect } = require(inspectPath)
36
37 const result = await inspect(db)
38 await db.close()
39 return result
40}
41
42export async function tearDownMongo(options: SetupParams) {
43 const { connectionString } = options

Callers

nothing calls this directly

Calls 2

closeMethod · 0.80
inspectFunction · 0.50

Tested by

no test coverage detected