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
Double quotes #1
Conversation
This fix doesn't work for me personally. I tested it out locally with an mssql server, and For me, |
Seems to me that in mssql, |
I think I went through this same conundrum when I was originally writing this library. In T-SQL the double-quote itself can be considered a way to protect identifiers but only if the setting is turned on for the server (something this library may not be able to easily detect). In other words, escaping the double-quote could potentially break queries that already have protected identifiers and cause it to totally break. So, like @samjross said, I think we just need to remove the So, @tdiam if you just want to make that change and undo the other stuff, that'd probably fix it. I'd be happy to get this PR merged in. |
@tdiam I've updated your remote branch with some suggested edits. The only thing you need to do now is remove the double quote item from |
@tdiam, actually, it looks like I was able to edit your branch directly somehow? So, I'll go ahead and merge this in and up date the package on NPM. |
Patch added to NPM as v1.0.1. |
Yep, I reached the same conclusions. Thanks for the input and for merging @samjross, @kylefarris ! |
awesome, thank you @kylefarris ! |
@kylefarris I can't see a way to open an issue on this repo, but I've run into a problem with new lines, |
Even though double quotes were included in
CHARS_GLOBAL_REGEXP
there was no escape mapping.This PR resolves this issue:
EDIT: Actually, if I understand it correctly, double quotes do not need escaping unless
QUOTED_IDENTIFIER
isON
.@kylefarris how do you think this should be handled?