W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[indexedb] IDBIndex.getKey incorrect description.

From: Israel Hilerio <israelh@microsoft.com>
Date: Thu, 9 Jun 2011 23:49:58 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
CC: Jim Wordelman <jaword@microsoft.com>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D1495C7@TK5EX14MBXC115.redmond.corp.microsoft.com>
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?

Received on Thursday, 9 June 2011 23:50:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:20 UTC