Open arv opened 1 year ago
https://discord.com/channels/830183651022471199/1050431029602697226/1050431029602697226
In a useSubscribe query, I have the following:
useSubscribe
const countWithoutIndex = ( await txn .scan({ limit: 1, }) .entries() .toArray() ).length; const countWithIndex = ( await txn .scan({ indexName: "foo", limit: 1, start: { key: ["bar"], }, }) .entries() .toArray() ).length;
I observed that countWithoutIndex is always 1 (respecting the limit option as expected), but countWithIndex is not 1. It seems that the scan iterator does start at the provided index value ("bar"), but it doesn't stop at the given limit.
countWithoutIndex
countWithIndex
https://discord.com/channels/830183651022471199/1050431029602697226/1050431029602697226
In a
useSubscribe
query, I have the following:I observed that
countWithoutIndex
is always 1 (respecting the limit option as expected), butcountWithIndex
is not 1. It seems that the scan iterator does start at the provided index value ("bar"), but it doesn't stop at the given limit.