We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 936f5aa commit 518c2feCopy full SHA for 518c2fe
src/query/drivers/sql/TableRepository.ts
@@ -151,14 +151,20 @@ export abstract class TableRepository<
151
UPDATE
152
"${this.tableName}"
153
SET
154
- ?
+ ${Object.keys(filteredPayload).map(() => "?? = ?")}
155
${filterQuery !== "" ? "WHERE" : ""}
156
${filterQuery}
157
`
158
159
+ let payloadParameters: Array<any> = []
160
+ Object.keys(filteredPayload).forEach((k) => {
161
+ payloadParameters.push(k)
162
+ payloadParameters.push(filteredPayload[k])
163
+ })
164
+
165
let [processedQuery, processedParameters] = pgQueryPostProcessor(
166
lookupQuery,
- parameters
167
+ [...payloadParameters, ...parameters]
168
)
169
await connection.query(processedQuery, processedParameters)
170
}
0 commit comments