- From: Joshua Bell <notifications@github.com>
- Date: Mon, 10 Aug 2015 13:52:52 -0700
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
Received on Monday, 10 August 2015 20:53:22 UTC
Imported from https://www.w3.org/Bugs/Public/show_bug.cgi?id=21836 Currently, the spec for [IDBObjectStore.createIndex](https://w3c.github.io/IndexedDB/#dom-idbobjectstore-createindex) has: > If keyPath is a sequence and multiEntry is set, throw an InvalidAccessError exception. This disallows some interesting use cases, although the expected behavior in more complex cases is unclear. Per @sicking: Consider a multiEntry index with keyPath ["a", "b"] It's pretty intuitive that storing a value like: ``` { id: 1, a: "apple", b: "orange" } ``` would add the following entries to the index: "apple" -> 1 "orange" -> 1 But what would storing the following value result in? ``` { id: 1, a: ["apple", "x"], b: ["orange", "y"] } ``` Would this result in the following entries A) ["apple", "x"] -> 1 ["orange", "y"] -> 1 or B) "apple" -> 1 "x" -> 1 "orange" -> 1 "y" -> 1 or C) ["apple", "orange"] -> 1 ["x", "y"] -> 1 --- Reply to this email directly or view it on GitHub: https://github.com/w3c/IndexedDB/issues/36
Received on Monday, 10 August 2015 20:53:22 UTC