1
0
Fork 0
mirror of synced 2024-09-20 03:08:18 +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 // 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,
}, },
}, },
} }