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 11948 - index.openCursor's cursor should have a way to access the index's "value" (in addition to the index's key and objectStore's value)
Summary: index.openCursor's cursor should have a way to access the index's "value" (in...
Status: RESOLVED DUPLICATE of bug 12261
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 19:00 UTC by Jeremy Orlow
Modified: 2011-03-08 00:21 UTC (History)
2 users (show)

See Also:


Attachments

Description Jeremy Orlow 2011-02-01 19:00:29 UTC
As discussed in the mailing list thread from bug 11257, we should add some way for index.openCursor cursors to access the primary key for the objectStore.  .indexValue, .objectStoreKey, or .primaryKey might be good names to use for it.
Comment 1 Jeremy Orlow 2011-03-01 03:51:55 UTC
The idea is to have an IDBCursor and an IDBCursorWithValue interface which inherits from the former.  index.openKeyCursor will return the former and index/objectStore.openCursor will return the latter.  We'll add a primaryKey attribute to IDBCursor.  It will always be the key of the associated object store entry.  For index.openCursor cursors, the key attribute will be the key of the index.  For objectStore.openCursors, it'll be the same as the primaryKey.  The value will be the value of the objectStore entry.
Comment 2 Jeremy Orlow 2011-03-08 00:21:01 UTC

*** This bug has been marked as a duplicate of bug 12261 ***