diff options
author | Florian Dold <florian@dold.me> | 2021-12-01 18:16:40 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-12-01 18:16:47 +0100 |
commit | 668ffa7302d9f1629848c250904fd269979bb8b0 (patch) | |
tree | 4a32d212d1146383bb4bd16132dec4fa09845f73 /packages/taler-wallet-core/src/util | |
parent | b0c2a73146907b2edeb1d2c97536478c995eb73b (diff) | |
download | wallet-core-668ffa7302d9f1629848c250904fd269979bb8b0.tar.xz |
wallet-core: implement exportDb API call
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> |