We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7dbc9f1 + 357eea9 commit 4841a70Copy full SHA for 4841a70
src/ls/queries.ts
@@ -93,8 +93,11 @@ const treeFunctionFilter = function(p: { [key: string]: any }): string {
93
}
94
95
const fetchRecords: IQueries['fetchRecords'] = queryFactory`
96
-SELECT TOP ${p => p.limit || 50} *
97
-FROM ${p => p.table.schema}.${p => (p.table.label || p.table)}
+SELECT * FROM (
+ SELECT TOP ALL *
98
+ FROM ${p => p.table.schema}.${p => (p.table.label || p.table)}
99
+)
100
+WHERE %vid BETWEEN ${p => (p.offset || 0) + 1} AND ${p => ((p.offset || 0) + (p.limit || 50))}
101
`;
102
103
const countRecords: IQueries['countRecords'] = queryFactory`
0 commit comments