MCPcopy
hub / github.com/prisma/prisma / getMSSQLConfig

Function getMSSQLConfig

packages/client/src/utils/setupMSSQL.ts:10–26  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

8 dirname: string
9}
10function getMSSQLConfig(url: string): mssql.config {
11 const connectionUrl = new URL(url)
12 return {
13 user: connectionUrl.username,
14 password: connectionUrl.password,
15 server: connectionUrl.hostname,
16 port: Number(connectionUrl.port),
17 database: connectionUrl.pathname.substring(1),
18 pool: {
19 max: 1,
20 },
21 options: {
22 enableArithAbort: false,
23 trustServerCertificate: true, // change to true for local dev / self-signed certs
24 },
25 }
26}
27export async function setupMSSQL(options: SetupParams): Promise<void> {
28 const { connectionString } = options
29 const { dirname } = options

Callers 1

setupMSSQLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected