- From: <bugzilla@jessica.w3.org>
- Date: Mon, 30 Jan 2012 19:39:02 +0000
- To: public-webapps@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15796 Summary: Specify how to extract a key when keyPath is an array Product: WebAppsWG Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Indexed Database API AssignedTo: dave.null@w3.org ReportedBy: odinho@opera.com QAContact: member-webapi-cvs@w3.org CC: mike@w3.org, public-webapps@w3.org createObjectStore allows us to get a keyPath that is an array[1]. But there is as far as I can tell a lack of explicit mention of the possibility of the keyPath being an array later. Does it belong in the steps for extracting a key path from a value? [2] Or possibly more fitting, a step up in the hierarchy like the steps for storing a record into and object store. Anyway, keyPath as Array seems to be well specified for Indexes, both in IDBObjectStore.add [3] and in the steps for storing a record into an object store [4], but not so for keys, AFAICS. Maybe change step 1 in "steps for storing a record into an object store" from: > 1. If store does use in-line keys and evaluting store's key path on value > does yield a value, then set key to that result. to: > 1. If store uses in-line keys and the store's key path is an [Array] > then set /tempkey/ to a newly created empty Array. For each item in > the key path [evaluate] the item on value. If this does not yield a > value continue to next step. Otherwise add the value to the end of > /tempkey/. When the array is finished set /key/ to /tempkey/. > > 2. Else if store does use in-line keys and evaluating store's key path > on value yields a value, then set key to that result. Possibly changed to clearer and more succinct language :P 1. http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-IDBObjectStoreParameters-optionalParameters 2. http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#dfn-steps-for-extracting-a-key-from-a-value-using-a-key-path 3. http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBObjectStore-add-IDBRequest-any-value-any-key 4. http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#dfn-steps-for-storing-a-record-into-an-object-store -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
Received on Monday, 30 January 2012 19:39:04 UTC