Skip to content

Commit 3680074

Browse files
committed
Hotfix for create method in PG Table Repository flow
1 parent 554c123 commit 3680074

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
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.6.3",
3+
"version": "2.6.4",
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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,17 @@ export abstract class TableRepository<
7373
} else {
7474
let query = `
7575
INSERT INTO
76-
"${this.tableName}" (${Object.keys(filteredPayload).map(
76+
?? (${Object.keys(filteredPayload).map(
7777
() => "??"
7878
)})
7979
VALUES
8080
(${Object.keys(filteredPayload).map(() => "?")})
8181
RETURNING ??
8282
`
8383

84-
let parameters: Array<any> = []
84+
let parameters: Array<any> = [
85+
this.tableName
86+
]
8587

8688
Object.keys(filteredPayload).forEach((k: string) => {
8789
parameters.push(k)

0 commit comments

Comments
 (0)