You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I didn't have time to do much research but escaping with SQLite does not look right. According to specs, the only thing that needs to be escaped outside of LIKE, GLOB, REGEXP, and MATCH operators are single quotes: ' -> ''. Goqu escapes them wrong ' -> \' and also escapes a lot more then is needed. This leads to bad strings saved to DB or syntax errors in the case of single quotes.
Custom dialect with only these escape runes fixed my issue:
Describe the bug
I didn't have time to do much research but escaping with SQLite does not look right. According to specs, the only thing that needs to be escaped outside of LIKE, GLOB, REGEXP, and MATCH operators are single quotes:
'
->''
. Goqu escapes them wrong'
->\'
and also escapes a lot more then is needed. This leads to bad strings saved to DB or syntax errors in the case of single quotes.Custom dialect with only these escape runes fixed my issue:
To Reproduce
Add this test to
dialect/sqlite3
Output:
Received unexpected error: near "abc": syntax error
Expected behavior
No error.
Dialect:
The text was updated successfully, but these errors were encountered: