-
Notifications
You must be signed in to change notification settings - Fork 605
feat: add no-escape mode for MySQL #861
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
Comments
if it's worth implementing, i'd like to work on it😊 |
I can see the rationale for trying to keep the original escaping (as opposed to processing the escapes). What do you think about maybe trying to add this feature as some sort of Dialect (which is the current way we have to control parsing changes)? |
thanks, i think that's a really good way! |
#870 is ready for review. Thank you for waiting! |
I believe we released this in 0.36.0 - so closing. Please reopen if I got that wrong |
Hi, thank you for developing this amazing parser...!
I use it for building a MySQL formatter and it help me so much😊
I'm not 100% sure if the idea I write below is good one, but I would like to share it for discussion.
idea
The implementation of no-escape mode.
It means that the info of escape (=backslashes) is kept through parsing and restoring queries.
current situation and details of idea
Currently, this library works as below. In short, backslashes disappear.
That can be a bit problematic when using this library for developing other tools,
because some tools (e.g. formatter) are expected not to add any change to the queries.
So what about the idea that users can choose if they keep backslashes or not?
prototype
Actually, I created a small patch to realize the above feature in my forked repo.
And, just for clarification, I opened a draft of PR: #862
NOTE: I'm pretty sure the patch is not for implementation for this library. It is just an emergency patch for my formatter :)
Thank you for reading!😊
The text was updated successfully, but these errors were encountered: