This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16595 - Ability to get non-sequential records from various operations
Summary: Ability to get non-sequential records from various operations
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-01 21:01 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2015-05-23 00:15 UTC (History)
3 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2012-04-01 21:01:37 UTC
Basically the idea is to be able to get several distinct keys from for example a objectStore.get operation.

This is especially interesting for index.get since it would remove the need for authors to remove duplicate records.

Not sure if the answer is to allow passing multiple keys to an IDBKeyRange constructor, or if the answer is allowing objectStore.get/index.openCursor etc to take an array of keys+IDBKeyRanges.

Filing this for consideration for v2
Comment 1 Jonas Sicking (Not reading bugmail) 2013-05-15 21:52:50 UTC
We had a get-together with google on a variety of topics and this bug was discussed. General feelings was that this wasn't urgent.

https://docs.google.com/document/d/1vvC5tFZCZ9T8Cwd2DteUvw5WlU4YJa2NajdkHn6fu-I/edit?usp=sharing
Comment 2 Joshua Bell 2015-04-23 16:01:41 UTC
We're thinking of tackling this with a combination of two new entry points:

IDBObjectStore/IDBIndex#getAll(keys [, count]) - implemented in FF, WIP in Chrome

IDBKeySet - a set (*gasp*!) of keys.

getAll() and existing methods that take a key-or-range would be extended to take key-or-range-or-set.
Comment 3 Joshua Bell 2015-05-23 00:15:20 UTC
Now tracked as https://github.com/w3c/IndexedDB/issues/19