(connection: IConnection, dbname?: string)
| 56 | } |
| 57 | |
| 58 | static getConnectionWithDB(connection: IConnection, dbname?: string): IConnection { |
| 59 | if (!dbname) return connection; |
| 60 | return { |
| 61 | label: connection.label, |
| 62 | host: connection.host, |
| 63 | user: connection.user, |
| 64 | password: connection.password, |
| 65 | port: connection.port, |
| 66 | database: dbname, |
| 67 | multipleStatements: connection.multipleStatements, |
| 68 | certPath: connection.certPath |
| 69 | }; |
| 70 | } |
| 71 | |
| 72 | public static async createConnection(connection: IConnection, dbname?: string): Promise<PgClient> { |
| 73 | const connectionOptions: any = Object.assign({}, connection); |
no outgoing calls
no test coverage detected