diff options
author | Florian Dold <florian@dold.me> | 2023-08-30 18:33:56 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-30 18:33:56 +0200 |
commit | 8fed5b4b7370431602c0b25f8142009e61f7b906 (patch) | |
tree | 3f188e815eb56e9d69ef1ef7fe6da663a8d8e2e5 /packages/taler-wallet-core/src/util | |
parent | a713d90c3c564408309d92223d383ecc9225924f (diff) | |
download | wallet-core-8fed5b4b7370431602c0b25f8142009e61f7b906.tar.xz |
wallet-core: allow version change event
Diffstat (limited to 'packages/taler-wallet-core/src/util')
-rw-r--r-- | packages/taler-wallet-core/src/util/query.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/util/query.ts b/packages/taler-wallet-core/src/util/query.ts index eb2bddec1..7697ed3db 100644 --- a/packages/taler-wallet-core/src/util/query.ts +++ b/packages/taler-wallet-core/src/util/query.ts @@ -376,8 +376,8 @@ export interface InsertResponse { export interface StoreReadWriteAccessor<RecordType, IndexMap> { get(key: IDBValidKey): Promise<RecordType | undefined>; iter(query?: IDBValidKey): ResultStream<RecordType>; - put(r: RecordType): Promise<InsertResponse>; - add(r: RecordType): Promise<InsertResponse>; + put(r: RecordType, key?: IDBValidKey): Promise<InsertResponse>; + add(r: RecordType, key?: IDBValidKey): Promise<InsertResponse>; delete(key: IDBValidKey): Promise<void>; indexes: GetIndexReadWriteAccess<RecordType, IndexMap>; } @@ -652,15 +652,15 @@ function makeWriteContext( const req = tx.objectStore(storeName).openCursor(query); return new ResultStream<any>(req); }, - async add(r) { - const req = tx.objectStore(storeName).add(r); + async add(r, k) { + const req = tx.objectStore(storeName).add(r, k); const key = await requestToPromise(req); return { key: key, }; }, - async put(r) { - const req = tx.objectStore(storeName).put(r); + async put(r, k) { + const req = tx.objectStore(storeName).put(r, k); const key = await requestToPromise(req); return { key: key, |