1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat(PostgreSQL): database in connection parameters

This commit is contained in:
2021-03-17 16:51:26 +01:00
parent 8a6c59f7ce
commit 964570247f
8 changed files with 80 additions and 30 deletions

View File

@ -75,7 +75,8 @@ export class PostgreSQLClient extends AntaresCore {
async connect () {
if (!this._poolSize) {
const client = new Client(this._params);
this._connection = client.connect();
await client.connect();
this._connection = client;
}
else {
const pool = new Pool({ ...this._params, max: this._poolSize });