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

Re: IndexedDB: Key generators (autoIncrement) and Array-type key paths

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 11 Apr 2012 22:56:44 -0700
Message-ID: <CA+c2ei8NFp5Zk356cZ5c+4=kDGjdo-Fmx8hc_UoL5cV3PDouqg@mail.gmail.com>
To: Joshua Bell <jsbell@chromium.org>
Cc: public-webapps@w3.org
On Wed, Apr 11, 2012 at 4:47 PM, Joshua Bell <jsbell@chromium.org> wrote:
> Something I'm not seeing covered by the spec - what should the behavior be
> when inserting a value into an object store if the object store has a key
> generator and the key path is an Array? Should this be supported, or is it
> an error?
...
> If we want to prevent this, the spec change would be:
>
> OLD: If the optionalParameters parameter is specified, and autoIncrement is
> set to true, and the keyPath parameter is specified to the empty string, or
> specified to an Array and one of the items is an empty string, this
> function must throw a InvalidAccessError exception.
>
> NEW: If the optionalParameters parameter is specified, and autoIncrement is
> set to true, and the keyPath parameter is specified to the empty string, or
> specified to an Array, this function must throw
> a InvalidAccessError exception.

I thought that this was what the spec already said, but you are indeed
correct. Yes, I think we should make exactly this change. I think this
matches the Firefox implementation.

> [1] SPEC NIT: 4.7 step 1.2 says "If the result of the previous step was not
> a valid key path, then..." - presumable this should read "... was not a
> valid key, then..."

File a bug?

/ Jonas
Received on Thursday, 12 April 2012 05:57:55 GMT

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