Re: [w3c/IndexedDB] How to read direction predicates in iterate a cursor? (Issue #450)

inexorabletash left a comment (w3c/IndexedDB#450)

It's an "AND", so to be fully explicit:

* If primaryKey is defined, the record’s [index] key is equal to [index] key and the record’s value [primaryKey] is greater than or equal to primaryKey.
* If primaryKey is defined, the record’s [index] key is greater than [index] key.

Each of the bullets is a predicate that restricts the range of potential keys. Another way of saying this would be: _"If there's a matching key/primaryKey, then that's the result. Otherwise it's the next in order with a matching key. If there isn't one of those it's the next in order."_ But it's not that simple, since if the cursor has advanced past that position then nothing should be found. Hence the current formulation.




-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/450#issuecomment-2845678751
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/issues/450/2845678751@github.com>

Received on Thursday, 1 May 2025 20:16:39 UTC