- From: Josh <notifications@github.com>
- Date: Wed, 02 Nov 2016 11:32:23 -0700
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Message-ID: <w3c/IndexedDB/issues/69/257957969@github.com>
In addition to putAll, please also consider batch add/delete. Off the top of my head, something like a couple of these: * store.addAll(sequence<value> values) - like store.putAll but error if keys exist * store.deleteAll(optional range) - like store.clear() but limited to range * store.clear(optional range) - if no range then behave like now, if range then limit deletes to range * index.deleteAll(optional range) - limited to store objects referenced by the the index that are within range. The missing functionality is basically `DELETE FROM store WHERE ...`. As a trivial example, I am working on a simple rss app with stores feeds and articles. When unsubscribing, I open a rw tx over both stores, then delete feed from feeds and articles from articles where article.feedId = feedId. To delete the articles, I must first open a cursor over an index on article.feedId with IDBKeyRange.only(feedId), or use getAll or getAllKeys, then I must iterate over the articles and issue individual deletes. It would be nicer to skip the getAllKeys step, and use a single batch delete request that accepts a range. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/IndexedDB/issues/69#issuecomment-257957969
Received on Wednesday, 2 November 2016 18:33:20 UTC