-
Notifications
You must be signed in to change notification settings - Fork 348
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
Problem with Aliasing columns with with sql keywords #2738
Comments
@MalkaSteinberg , I don't know if you found a workaround for this, but in our projects we have extended the context trait NamingSqlServerJdbcContext extends SqlServerJdbcContext:
override def tokenizeColumnAlias(strategy: NamingStrategy, column: String): String =
strategy.column(column)
override def tokenizeFixedColumn(strategy: NamingStrategy, column: String): String =
strategy.column(column)
override def tokenizeTableAlias(strategy: NamingStrategy, table: String): String =
strategy.table(table)
override def tokenizeIdentName(strategy: NamingStrategy, name: String): String =
strategy.default(name) If the naming strategy doesn't quote the column alias, fixed column and table alias, those should be quoted as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: 4.6.0:
Module: quill-jdbc:
Database: Sql Server:
I have a field in my table name 'TO'. When running a select statement quill runs this:
select a."to" as to from email a
I would expect that quill would wrap the to as follows:
select a."to" as [to] from email a
quill should be responsible for escaping reserved sql words.
@getquill/maintainers
The text was updated successfully, but these errors were encountered: