Re: [indexeddb] Do we need to support keyPaths with an empty string?

Mozilla is fine with removing the special |keyPath:""| behavior.
Please note that this will also mean that step 1 of the algorithm here

will need to change.

We do want to continue to allow set behavior without specifying the
key twice, though, so we would propose adding an additional option to
createObjectStore to accomplish this:

  // Old way:
  var set = db.createObjectStore("mySet", { keyPath:"" });

  // New way:
  var set = db.createObjectStore("mySet", { isSet: true });

(We are not in love with "isSet", better names are highly encouraged!)

What do you all think? This would allow us to continue to support nice
set behavior without making the empty string "magic".


Received on Friday, 20 January 2012 20:24:10 UTC