diff options
Diffstat (limited to 'packages/taler-wallet-core/src/util')
-rw-r--r-- | packages/taler-wallet-core/src/util/query.ts | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/util/query.ts b/packages/taler-wallet-core/src/util/query.ts index a95cbf1ff..2d0fc077e 100644 --- a/packages/taler-wallet-core/src/util/query.ts +++ b/packages/taler-wallet-core/src/util/query.ts @@ -488,9 +488,12 @@ function makeReadContext( return new ResultStream<any>(req); }, getAll(query, count) { - const req = tx.objectStore(storeName).index(indexName).getAll(query, count); + const req = tx + .objectStore(storeName) + .index(indexName) + .getAll(query, count); return requestToPromise(req); - } + }, }; } ctx[storeAlias] = { @@ -534,9 +537,12 @@ function makeWriteContext( return new ResultStream<any>(req); }, getAll(query, count) { - const req = tx.objectStore(storeName).index(indexName).getAll(query, count); + const req = tx + .objectStore(storeName) + .index(indexName) + .getAll(query, count); return requestToPromise(req); - } + }, }; } ctx[storeAlias] = { @@ -574,6 +580,10 @@ function makeWriteContext( export class DbAccess<StoreMap> { constructor(private db: IDBDatabase, private stores: StoreMap) {} + idbHandle(): IDBDatabase { + return this.db; + } + mktx< PickerType extends (x: StoreMap) => unknown, BoundStores extends GetPickerType<PickerType, StoreMap> |