This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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. [1] http://lists.w3.org/Archives/Public/public-webapps/2010AprJun/1094.html [2] http://lists.w3.org/Archives/Public/public-webapps/2010AprJun/0882.html
Agreed. Explicitly managed indexes add a lot of surface area and offer nothing that can't be easily emulated with an objectStore.
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.
Fixed: http://dvcs.w3.org/hg/IndexedDB/rev/c2618f86a774