conn limit and type optional
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
1f0ffbeba9
commit
123bbeba6c
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ export class DB {
|
|||
type: dbType;
|
||||
mariaPool!: mariadb.Pool;
|
||||
//pgPool!: pg.Pool;
|
||||
constructor({ host, user, password, database, connectionLimit = 5, databaseType = dbType.mariadb }: { host: string, user: string, password: string, database: string, connectionLimit: number, databaseType: dbType }) {
|
||||
constructor({ host, user, password, database, connectionLimit = 5, databaseType = dbType.mariadb }: { host: string, user: string, password: string, database: string, connectionLimit?: number, databaseType?: dbType }) {
|
||||
this.type = databaseType;
|
||||
if (databaseType == dbType.mariadb) {
|
||||
this.mariaPool = mariadb.createPool({ host, user, password, database, connectionLimit, multipleStatements: true });
|
||||
|
|
Loading…
Reference in a new issue