Re: [w3c/IndexedDB] `getAll()` with both key and value (or index key and primary key) (#206)

Sketching this out a bit more:

```js
store.getAllEntries({
   query: key_or_value,
   count: limit,
   direction: next_or_prev
});
// yields: [ [ key1, value1 ], [ key2, value2 ], ... ]

index.getAllEntries({
   query: key_or_value,
   count: limit,
   direction: next_or_prev
}); 
// yields: [ [ primaryKey1, value1, indexKey1 ], [ primaryKey2, value2, indexKey2 ], ... ]
```

Note that this still doesn't allow trivial paging of results i.e. with a "skip". 

* All options are optional
* The `direction` option would be IDBCursorDirection limited to `"prev"` or `"next"` (throwing otherwise).
* Open question: when direction is `"prev"` are the results in forward or reverse order?


-- 
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/206#issuecomment-566205600

Received on Monday, 16 December 2019 19:25:49 UTC