querybuilder icon indicating copy to clipboard operation
querybuilder copied to clipboard

Escape problem on insert (MySQL)

Open 0x25CBFC4F opened this issue 2 years ago • 0 comments

Version: 2.3.7 (also tested on 2.4.0) When inserting escaped JSON string SqlKata generates incorrect SQL:

INSERT INTO `Table` (`field`)
VALUES ('{"Name":"\u111B"}')
ON DUPLICATE KEY UPDATE someField=null;

Which results in adding a new row with the name of u111B which is incorrect.

Expected behavior: I expected SqlKata to escape input string, so \u111B so that becomes \\u111B.

0x25CBFC4F avatar Jun 23 '23 16:06 0x25CBFC4F