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

Re: [IndexedDB] Key paths need to be specified better

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 8 Jun 2012 12:30:44 -0700
Message-ID: <CA+c2ei8vo3f1cHcf3mpn6mmEp0HgJd372xAaOt_ss-qU9fBeRQ@mail.gmail.com>
To: Odin HÝrthe Omdal <odinho@opera.com>
Cc: public-webapps@w3.org
On Fri, Jun 8, 2012 at 10:42 AM, Odin HÝrthe Omdal <odinho@opera.com> wrote:
> Kyle Huey <me@kylehuey.com> skreiv Fri, 08 Jun 2012 19:22:54 +0200
>> In particular the spec states that key paths are DOMStrings, and then goes
>> on to state how Array key paths are handled. †Whatever changes are made need
>> to preserve the note about key paths not nesting just after 4.7.1.
> Definately seconded. We've had some misunderstandings because of this. You
> can give an array of keyPaths both consumers, but IDBObjectStoreParameters
> is totally lying straight to our face by saying "DOMString?".
> IDBObjectStore.createIndex IDL is "any keyPath", which is correct. It may
> even be clearer to write (DOMString? keyPath or DOMString[] keyPath) or do
> an overload. You'd have to ask someone who knows WebIDL better :-)
> You are supposed to give keyPaths as arrays, they can be very useful. It
> will build a new array of the values it found from each of the keyPaths
> that's used as a key. They won't disappear, they exist in all IDB
> implementations - the unclarity stems from the spec.

Agree. We should define that a keyPath is a string which follows a
particular syntax, or an array of strings which all follow that same
syntax. There should be no place in the spec where a string-keypath is
valid but a array-keypath is not.

Could someone please file a bug on this.

/ Jonas
Received on Friday, 8 June 2012 19:31:43 UTC

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