[IndexedDB] Consider adding some way to retrieve secondary keys when using IDBIndex.getAllKeys (#71)

When using `IDBIndex.openKeyCursor` to retrieve all keys satisfying some range, I can easily get the secondary key (the value indexed for that particular record) in addition to the primary one, for example:

```js
...
let results = [];

let cursorRequest = objectStore.index("myIndex").openKeyCursor(range);

cursorRequest.onsuccess = (event) => {
 let cursor = event.target.result;

 if (cursor) {
  results.push({ primaryKey: cursor.primaryKey, key: cursor.key });
  cursor.continue();
 }
 else {
  resolve(results);
 }
}
...
```

Is/will there be any way to achieve the same when using `IDBIndex.getAllKeys`, or falling back to using cursors is planned to remain the most efficient solution?

---
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/71

Received on Saturday, 19 March 2016 13:18:05 UTC