1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

fix: handle id type correctly in update-table-cell where clause, fixes #974

This commit is contained in:
2025-04-14 09:10:05 +02:00
parent a95a76480c
commit 8f84892f07

View File

@ -221,7 +221,7 @@ export default (connections: Record<string, antares.Client>) => {
.update({ [params.field]: `= ${escapedParam}` })
.schema(params.schema)
.from(params.table)
.where({ [params.primary]: `= ${sqlEscaper(id)}` })
.where({ [params.primary]: `= ${typeof id === 'string' ? sqlEscaper(id) : id}` })
.limit(1)
.run();
}