This commit is contained in:
2026-09-23 19:39:36 +02:00
parent cbf1fec04d
commit 2237aae4f8
4 changed files with 8 additions and 6 deletions

View File

@@ -32,10 +32,12 @@ export class KVDB {
/**
* Switch database table/context sharing the same connection pool
* @param {string} newTableName
* @returns {KVDB}
* @returns {Promise<KVDB>}
*/
table(newTableName) {
return new KVDB(this.pool, newTableName);
async table(newTableName) {
const newDb = new KVDB(this.pool, newTableName);
await newDb.init();
return newDb;
}
/**