Skip to content

Commit

Permalink
Fix pagination for Show Table Records
Browse files Browse the repository at this point in the history
  • Loading branch information
gjsjohnmurray committed May 1, 2024
1 parent 50c52be commit 92f5517
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ls/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ const treeFunctionFilter = function(p: { [key: string]: any }): string {
}

const fetchRecords: IQueries['fetchRecords'] = queryFactory`
SELECT TOP ${p => p.limit || 50} *
FROM ${p => p.table.schema}.${p => (p.table.label || p.table)}
SELECT * FROM (
SELECT TOP ALL *
FROM ${p => p.table.schema}.${p => (p.table.label || p.table)}
)
WHERE %vid BETWEEN ${p => (p.offset || 0) + 1} AND ${p => ((p.offset || 0) + (p.limit || 50))}
`;

const countRecords: IQueries['countRecords'] = queryFactory`
Expand Down

0 comments on commit 92f5517

Please sign in to comment.