3

I have an indexeddb keypath with arrays like this:

...
[0,1,3]
[0,1,4]
[0,1,5]
...

and I can get them by this:

IDBKeyRange.bound([0,1,2], [0,1,5] ,false,false)

The problem is when I compound the index to this keypath:

...
[[0,1,3],0]
[[0,1,4],1]
[[0,1,5],1]
...

This returns nothing:

IDBKeyRange.bound([[0,1,2],1], [[0,1,5],1] ,false,false)

It should return:

[[0,1,4],1]
[[0,1,5],1]
ccsacsa
  • 31
  • 2
  • Your assertions seem correct based on IDB's key ordering. So something else is going on. Are you seeing the same behavior across browsers (to rule out implementation bugs)? Can you provide a full minimized code sample, e.g. including the code that creates the store and index, populates it with sample values, and does the query? – Joshua Bell Jul 21 '22 at 17:39
  • There was a bug somewhere. While making the minimized code sample it showed the correct result but i had to swap the keypath to this: [1,[0,1,4]] – ccsacsa Jul 22 '22 at 02:06

0 Answers0