1
0
Fork 0
mirror of synced 2024-09-19 10:48:30 +12:00

Fix for SQL pagination.

This commit is contained in:
mike12345567 2024-08-21 17:33:10 +01:00
parent 3653a92627
commit 97a22227d9

View file

@ -1007,14 +1007,12 @@ class InternalBuilder {
// these are based on the _row_num
let paginationFilters: SearchFilters | undefined
if (!counting && foundLimit) {
const offset = foundOffset || 1
const offset = foundOffset || 0
paginationFilters = {
range: {
_row_num: {
// our low/high is inclusive - to not exceed limit we need to exclude
// a single row on the end
low: offset,
high: offset + foundLimit - 1,
low: offset + 1,
high: offset + foundLimit,
},
},
}