- From: ben turner <bent.mozilla@gmail.com>
- Date: Fri, 20 Jan 2012 12:23:21 -0800
- To: Israel Hilerio <israelh@microsoft.com>
- Cc: Joshua Bell <jsbell@chromium.org>, Odin Hørthe Omdal <odinho@opera.com>, "Jonas Sicking (jonas@sicking.cc)" <jonas@sicking.cc>, Adam Herchenroether <aherchen@microsoft.com>, David Sheldon <dsheldon@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Mozilla is fine with removing the special |keyPath:""| behavior. Please note that this will also mean that step 1 of the algorithm here http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#dfn-steps-for-extracting-a-key-from-a-value-using-a-key-path 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:"" }); set.put(keyValue); // New way: var set = db.createObjectStore("mySet", { isSet: true }); set.put(keyValue); (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". -Ben
Received on Friday, 20 January 2012 20:24:10 UTC