-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
v.db.select: fix escaping SQL columns names with SQL standard double quotes #3614
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a issue in couple places and I'm happy to see this addressed at least here. On the other hand, I'm not sure how the different systems handle quoting. It seems that while standard is a double quote, what is enabled by default and what double quote actually means may differ. More analysis may be required.
The previous implementation was passing the values as is, so one could pass the quoting characters and it would work. This will not work with the current code in this PR.
A test would be really good.
Most of systems GRASS supports are SQL standards compliant. MySQL compliance is addressed in #3612. This PR also needs an update to documentation – mention that quoting column parameter is not necessary any more. At the moment only DBF driver is broken – it needs some magick in sqlp.l file (any lex experts reading this?) |
efd580c
to
f5ba5ba
Compare
Test has been added. |
With this changes another v.dissolve module pytests fails. According my analysis, with automatically enclose column names with double quotes when v.db.select module param If v.db.select require to use Example with order column name:
|
Fix escaping SQL columns names with SQL standard double quotes if v.db.select module
columns
param arg is used.Example for testing purpose.
v.db.select module with
columns
param arg should sucessfully return columns data in the case when column name order is DB reserved keyword: