Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape problem on insert (MySQL) #677

Open
0x25CBFC4F opened this issue Jun 23, 2023 · 0 comments
Open

Escape problem on insert (MySQL) #677

0x25CBFC4F opened this issue Jun 23, 2023 · 0 comments

Comments

@0x25CBFC4F
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant