This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10027 - Remove explicit add/remove functions from IDBIndex
Summary: Remove explicit add/remove functions from IDBIndex
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Nikunj Mehta
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2010-06-28 20:56 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2010-10-25 18:12 UTC (History)
3 users (show)

See Also:


Description Jonas Sicking (Not reading bugmail) 2010-06-28 20:56:13 UTC
The spec currently allows entries to be manually added and removed from indexes. While this is one solution to the problem of indexing on computed values, it's not one that seems very popular.

There are currently a few other proposals that have been made for example [1] and [2].

Until we figure out how to do more complex indexes, I propose we remove the add/put/remove functions from IDBIndex. Similarly I propose that calling update() on a cursor opened using IDBIndex.openCursor is not allowed.

Comment 1 Jeremy Orlow 2010-06-29 05:02:38 UTC
Agreed.  Explicitly managed indexes add a lot of surface area and offer nothing that can't be easily emulated with an objectStore.
Comment 2 Jonas Sicking (Not reading bugmail) 2010-07-10 21:52:43 UTC
When fixing this, we should decide what to do when IDBCursor.update and IDBCursor.remove does when called on a cursor created using IDBIndex.openCursor.

We could either make the functions throw, or make them perform specified change to the objectStore entry that the cursor is referencing.
Comment 3 Jonas Sicking (Not reading bugmail) 2010-10-25 18:12:19 UTC