From 123bbeba6c93d89961142ef59c7c7ea9aeed8884 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Sun, 19 Feb 2023 13:43:19 +0100 Subject: [PATCH] conn limit and type optional --- src/db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.ts b/src/db.ts index f69447d..5685448 100644 --- a/src/db.ts +++ b/src/db.ts @@ -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 });