Method
connect
(dsn: string, initScript?: string, config?: ConnectorConfig)
Source from the content-addressed store, hash-verified
| 190 | } |
| 191 | |
| 192 | async connect(dsn: string, initScript?: string, config?: ConnectorConfig): Promise<void> { |
| 193 | try { |
| 194 | this.config = await this.dsnParser.parse(dsn, config); |
| 195 | |
| 196 | if (!this.config.options) { |
| 197 | this.config.options = {}; |
| 198 | } |
| 199 | |
| 200 | this.connection = await new sql.ConnectionPool(this.config).connect(); |
| 201 | } catch (error) { |
| 202 | throw error; |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | async disconnect(): Promise<void> { |
| 207 | if (this.connection) { |
Callers
nothing calls this directly
Tested by
no test coverage detected