(overrides: ConnectionConfiguration)
| 86 | } |
| 87 | |
| 88 | private mapOptions(overrides: ConnectionConfiguration): ConnectionConfiguration { |
| 89 | const options = this.getConnectionOptions(); |
| 90 | const ret = { |
| 91 | authentication: { |
| 92 | options: { |
| 93 | password: options.password, |
| 94 | userName: options.user, |
| 95 | }, |
| 96 | type: 'default', |
| 97 | }, |
| 98 | options: { |
| 99 | database: options.database, |
| 100 | port: options.port, |
| 101 | enableArithAbort: true, |
| 102 | fallbackToDefaultDb: true, |
| 103 | useUTC: this.config.get('forceUtcTimezone', false), |
| 104 | encrypt: false, |
| 105 | }, |
| 106 | server: options.host!, |
| 107 | } as ConnectionConfiguration; |
| 108 | |
| 109 | /* v8 ignore next */ |
| 110 | if (ret.server.includes('\\')) { |
| 111 | const [host, ...name] = ret.server.split('\\'); |
| 112 | ret.server = host; |
| 113 | ret.options!.instanceName = name.join('\\'); |
| 114 | delete ret.options!.port; |
| 115 | } |
| 116 | |
| 117 | return Utils.mergeConfig(ret, overrides); |
| 118 | } |
| 119 | |
| 120 | override async callRoutine<T>(routine: Routine, args: Record<string, unknown> = {}, ctx?: Transaction): Promise<T> { |
| 121 | if (routine.type === 'function') { |
no test coverage detected