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

fix: cannot update column value with composite primary key and JSON column, fixes #916

This commit is contained in:
️Yaskur Dyas⚔⚔️⚔
2025-01-14 04:44:29 +07:00
parent 507dc7d55b
commit 0029967619

View File

@@ -234,6 +234,9 @@ export default (connections: Record<string, antares.Client>) => {
for (const key in orgRow) {
if (typeof orgRow[key] === 'string')
orgRow[key] = `'${orgRow[key]}'`;
else if (typeof orgRow[key] === 'object') {
orgRow[key] = `CAST('${JSON.stringify(orgRow[key])}' AS JSON)`;
}
if (orgRow[key] === null)
orgRow[key] = `IS ${orgRow[key]}`;