Skip to content

Commit

Permalink
Merge pull request #54 from gjsjohnmurray/crimson-marlin
Browse files Browse the repository at this point in the history
Fix pagination for `Show Table Records`
  • Loading branch information
gjsjohnmurray authored Aug 30, 2024
2 parents 7dbc9f1 + 357eea9 commit 4841a70
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 @@ -93,8 +93,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 4841a70

Please sign in to comment.