Fix for SQL pagination.
This commit is contained in:
parent
3653a92627
commit
97a22227d9
1 changed files with 3 additions and 5 deletions
|
@ -1007,14 +1007,12 @@ class InternalBuilder {
|
||||||
// these are based on the _row_num
|
// these are based on the _row_num
|
||||||
let paginationFilters: SearchFilters | undefined
|
let paginationFilters: SearchFilters | undefined
|
||||||
if (!counting && foundLimit) {
|
if (!counting && foundLimit) {
|
||||||
const offset = foundOffset || 1
|
const offset = foundOffset || 0
|
||||||
paginationFilters = {
|
paginationFilters = {
|
||||||
range: {
|
range: {
|
||||||
_row_num: {
|
_row_num: {
|
||||||
// our low/high is inclusive - to not exceed limit we need to exclude
|
low: offset + 1,
|
||||||
// a single row on the end
|
high: offset + foundLimit,
|
||||||
low: offset,
|
|
||||||
high: offset + foundLimit - 1,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue