Search: fix off by one offset error
Offset is eventually passed to sqlite as an OFFSET clause. This works as follows: sqlite> select num from seq limit 5 offset 0; ┌─────┐ │ num │ ├─────┤ │ 1 │ │ 2 │ │ 3 │ │ 4 │ │ 5 │ └─────┘ sqlite> select num from seq limit 5 offset 5; ┌─────┐ │ num │ ├─────┤ │ 6 │ │ 7 │ │ 8 │ │ 9 │ │ 10 │ └─────┘ However, the code currently emits a request for offset + 1, which ends up skipping a message sqlite> select num from seq limit 5 offset 5+1; ┌─────┐ │ num │ ├─────┤ │ 7 │ │ 8 │ │ 9 │ │ 10 │ │ 11 │ └─────┘
This commit is contained in:
parent
8095d9e88a
commit
51c9ce078d
@ -212,7 +212,7 @@ export default defineComponent({
|
||||
networkUuid: network.value?.uuid,
|
||||
channelName: channel.value?.name,
|
||||
searchTerm: String(route.query.q || ""),
|
||||
offset: offset.value + 1,
|
||||
offset: offset.value,
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user