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

Re: [indexeddb] IDBIndex.getKey incorrect description.

From: Jonas Sicking <jonas@sicking.cc>
Date: Thu, 16 Jun 2011 20:55:19 -0700
Message-ID: <BANLkTi=jmdZuHj13NMVaexuNA1ecLJp5cw@mail.gmail.com>
To: Israel Hilerio <israelh@microsoft.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>, Jim Wordelman <jaword@microsoft.com>
On Tue, Jun 14, 2011 at 9:00 AM, Israel Hilerio <israelh@microsoft.com> wrote:
> 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?

I *think* things are correct as they are since the 'value' field of
the records in an index contains keys for the object store. Compare to
the "steps for retrieving a referenced value from an index" algorithm
used by IDBIndex.get().

/ Jonas
Received on Friday, 17 June 2011 03:56:16 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT