(config: MSSQLConfig)
| 304 | } |
| 305 | |
| 306 | async function createMSSQLPool(config: MSSQLConfig): Promise<Pool> { |
| 307 | const conn = await mssql.connect({ |
| 308 | server: config.host, |
| 309 | port: config.port, |
| 310 | user: config.user, |
| 311 | password: config.password, |
| 312 | database: config.database, |
| 313 | requestTimeout: config.queryTimeout, |
| 314 | options: { |
| 315 | encrypt: config.encrypt, |
| 316 | trustServerCertificate: config.trustServerCertificate, |
| 317 | }, |
| 318 | }); |
| 319 | return mssqlPool(conn); |
| 320 | } |
| 321 | |
| 322 | function mssqlPool(pool: mssql.ConnectionPool): Pool { |
| 323 | return { |