Re: [IndexedDB] Support queries retrieving disjoint sets of keys (#19)

Web IDL typedefs can't be self-referential, so that won't quite work - *sigh*

...

Anyway, options include:

* `IDBKeyRange.inList(...)` (or `any(...)`) - disjoint "range".
 * Pro: easy entry point. minimal impact to other API IDLs
 * Con: not a range; `.lower`/`.upper`/etc cease to have meaning. See [public-webapps discussion](https://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0738.html)
* Introduce `IDBKeySet` (or `IDBKeyList`) w/ constructor that takes an iterable (of keys or throw)
 * Pro: does what it says - `new IDBKeySet(1, 2, 3)` is pretty straightforward
 * Con: yet another IDL-defined type
* Just use `Set` in the API
 * Pro: no type for type's sake
 * Con: need to define the binding for Set. Also, does it need to be a set or any iterable? But then it's easily confused with an Array (a valid key type)

Also: can you compose these with ranges? e.g. a set of keys and ranges?




---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/19#issuecomment-177643805

Received on Sunday, 31 January 2016 22:39:17 UTC