-
Notifications
You must be signed in to change notification settings - Fork 106
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
Session JSON getting escaped before going into the Database #24
Comments
So, it turns out that if you have NO_BACKSLASH_ESCAPE turned on, this errors shows up. The MySQL driver automatically escapes strings, so all the double quotes in the JSON string are being escaped. It wasn't noticed before because MySQL was ignoring the backslashes, but I think the auto-escaping of JSON is more the issue. I've suggested to the maintainers of the MySQL driver to try to detect if the string is JSON first before escaping. |
Alternatively, updating the query to concat the JSON string directly in would be another way around the problem. |
I don't think the issue you're experiencing should be handled within this module. It uses Hope this helps! |
Yeah, the node-mysql people are going to put the NO_BACKSLASH_ESCAPE as a known issue :) |
Great. Glad things got sorted out for you :) |
I'm consistently getting this error:
It seems that the mysql driver is escaping the data element when the SQL is generated.
Data Element:
Generated SQL:
Is there a configuration I've missed? I would think if everyone was seeing this it would be more widely known.
Config:
The text was updated successfully, but these errors were encountered: