Skip to content

Commit 7f67643

Browse files
committed
Fix LIMIT and OFFSET in Table Repository
1 parent 8bf6316 commit 7f67643

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strontium",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "Strontium is a TypeScript toolkit for High Performance API servers built for Production not Projects.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

src/query/drivers/sql/TableRepository.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,12 @@ export abstract class TableRepository<
118118

119119
if (pagination.limit) {
120120
lookupQuery = `${lookupQuery}
121-
LIMIT ?`
122-
parameters.push(pagination.limit)
121+
LIMIT ${pagination.limit}`
123122
}
124123

125124
if (pagination.offset) {
126125
lookupQuery = `${lookupQuery}
127-
OFFSET ?`
128-
parameters.push(pagination.offset)
126+
OFFSET ${pagination.offset}`
129127
}
130128

131129
let [processedQuery, processedParameters] = pgQueryPostProcessor(

0 commit comments

Comments
 (0)