You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming the Record & Tuple proposal lands in ECMAScript, we should support specifying composite keys with tuples. Namely things like this would be expected to work:
// tuples and arrays are equally valid ways to specify composite keysassert(indexedDB.cmp([1,2,3], #[1,2,3])===0);// tuples and arrays are interchangeable where keys are usedstore.put('value1', #[1,2,3]);store.put('value2',[4,5,6]);store.get([1,2,3]).onsuccess=e=>{assert(e.target.result==='value1';};store.get(#[4,5,6]).onsuccess=e=>{assert(e.target.result==='value2';};// but IndexedDB operations that return composite keys to script still produce arraysstore.put('value', #[1,2,3]).onsuccess=e=>{letkey=e.target.result;assert(Array.isArray(key));};
Assuming the Record & Tuple proposal lands in ECMAScript, we should support specifying composite keys with tuples. Namely things like this would be expected to work:
I believe this would only require normative changes in https://w3c.github.io/IndexedDB/#convert-value-to-key and an non-normative changes in https://w3c.github.io/IndexedDB/#key-construct
The text was updated successfully, but these errors were encountered: