-
Notifications
You must be signed in to change notification settings - Fork 122
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
Support for uppercase table name #168
Comments
OK, so what is the use-case you have multiple tables with similar names like Abc and aBc? |
My particular use-case is that the table name is provided externally, the table itself happens to have uppercase letters in its name, so queries provided by (for example) |
https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/ucase-lcase_r.html |
Adding that for tables names is trivial, adding for fields is more complicated. Would you mind sending a PR? |
I'm not sure there isn't some subtle issues here or backwards compatibility concern that I'm not aware of, hence the issue, not a PR. |
https://github.com/scylladb/gocqlx/blob/master/qb/select.go#L83
https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/ucase-lcase_r.html
Unless enclosed in double quotation mark, identifier is case-insensitive. Currently, construrct like this:
doesn't work unless you manually add quotes to name, which is creepy and seems likely to break something in the future.
Possibly, the same problem exists for some other identifiers.
The solution seems to be to always enclose identifiers in double quotation mark in generated statements.
The text was updated successfully, but these errors were encountered: