MCPcopy
hub / github.com/prisma/prisma / setupMSSQL

Function setupMSSQL

packages/client/src/utils/setupMSSQL.ts:27–38  ·  view source on GitHub ↗
(options: SetupParams)

Source from the content-addressed store, hash-verified

25 }
26}
27export async function setupMSSQL(options: SetupParams): Promise<void> {
28 const { connectionString } = options
29 const { dirname } = options
30 const schema = fs.readFileSync(path.join(dirname, 'setup.sql'), 'utf-8')
31 const config = getMSSQLConfig(connectionString)
32
33 const connectionPool = new mssql.ConnectionPool(config)
34 const connection = await connectionPool.connect()
35
36 await connection.query(schema)
37 await connection.close()
38}

Callers

nothing calls this directly

Calls 4

closeMethod · 0.80
getMSSQLConfigFunction · 0.70
connectMethod · 0.65
queryMethod · 0.45

Tested by

no test coverage detected