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

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

From: Odin Hørthe Omdal <odinho@opera.com>
Date: Fri, 08 Jun 2012 19:42:37 +0200
To: public-webapps@w3.org
Message-ID: <op.wflh5bse49xobu@localhost.localdomain>
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.

Odin (odinho / Velmont) - Opera Software
Received on Friday, 8 June 2012 17:43:10 UTC

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