Open scottohara opened 4 years ago
getAllKeys() only returns the store keys (primary keys) openKeyCursor() iteration is too slow on large sets
getAllKeys()
openKeyCursor()
Given: store.createIndex(["a", "b"])
store.createIndex(["a", "b"])
The only way to find all records where a = "foo" (regardless of b) is:
a = "foo"
IDBKeyRange.bound(["foo"], ["foo", "~"]);
(where "~" is the highest ascii character).
It would be preferable to be able to use something like IDBKeyRange.only("foo") instead.
IDBKeyRange.only("foo")
OR
i.e. key = A or key = B
key = A or key = B
Proposed solution seems to be IDBKeyList
IDBKeyList
e.g. active: true
active: true
No easy way to get all index keys
getAllKeys()
only returns the store keys (primary keys)openKeyCursor()
iteration is too slow on large setsJOINS
Arbitrary ORDER BY
Partial key searches
Given:
store.createIndex(["a", "b"])
The only way to find all records where
a = "foo"
(regardless of b) is:(where "~" is the highest ascii character).
It would be preferable to be able to use something like
IDBKeyRange.only("foo")
instead.No support for
OR
key searchesi.e.
key = A or key = B
Proposed solution seems to be
IDBKeyList
Indexing into nested arrays
Index keys can’t be boolean
e.g.
active: true