scottohara / tvmanager

PWA for tracking recorded, watched & upcoming TV shows
MIT License
3 stars 0 forks source link

Usability issues with IndexedDB #95

Open scottohara opened 4 years ago

scottohara commented 4 years ago

No easy way to get all index keys

getAllKeys() only returns the store keys (primary keys) openKeyCursor() iteration is too slow on large sets

JOINS

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:

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.

No support for OR key searches

i.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