Skip to content

Commit 5adc929

Browse files
authored
fix: escape backslashes in JSON stringification for postgres sql. (#48)
1 parent fa7a0eb commit 5adc929

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/orm/src/Drivers/DML/postgres.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ Driver.prototype.propertyToValue = function (
332332
case "object":
333333
if (value !== null) {
334334
if (!Buffer.isBuffer(value))
335-
value = JSON.stringify(value);
335+
value = JSON.stringify(value).replace(/\\/g, '\\\\');
336336
}
337337
break;
338338
case "date":

0 commit comments

Comments
 (0)