[indexeddb] IDBIndex.getKey incorrect description.

The description for the IDBIndex.getKey tells us to use "the steps for

retrieving a value from an index" as the operation.  These steps seem to deal

with how to retrieve values and not keys.  It seems, we need a new section

similar to this one that explains how to retrieve a primary key from an index.

The main issue we are having is knowing what to return when there are no

records that match the "key" parameter.  For example, imagine that we

create an index on an empty object store and immediately call getKey.  We

believe that this should call the onsuccess handler with a result set to

undefined.  This seems to match the spirit of the note under

IDBIndex.getKey.

I believe this will also affect the IDBIndexSync.getKey.

Do you agree?



Israel

Received on Tuesday, 14 June 2011 16:00:40 UTC