[Bug 17657] Empty arrays shouldn't be valid KeyPaths

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17657

--- Comment #16 from Jonas Sicking <jonas@sicking.cc> 2012-09-22 01:49:45 UTC ---
The point of disallowing [] as a valid KeyPath is that it's completely useless
to do so. Such a keypath can only ever generate one key value, namely []. So
creating an index on [] is completely useless, and creating a objectStore with
keyPath [] means that you can only store a single item, i.e. also pretty
useless.

This doesn't apply to "", inside or outside of an array. I.e. you can
definitely generate valid keys using a [""].

I can't however think of any usecases for using "" inside an Array though, but
I'm not sure that we should be limiting edge cases that work just because we
can't think of any uses. Should we similarly forbid using the same key in
multiple places in the array?

In any case, this belongs in a different bug since it's not really related to
empty arrays.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 22 September 2012 01:49:48 UTC