-
Notifications
You must be signed in to change notification settings - Fork 6
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
Keywords in column names are not supported due to missing escaping support #67
Comments
@Christoph-W This is a tricky edge case where the behavior should be highly dependent on the database engine at stake; which one are you using? Have you tried using |
The following combination seems to be the single valid solution: database.enable(Option.CASE_SENSITIVE_COLUMN_NAMES);
partitionsTable = JDBDT.table("USER_TAB_PARTITIONS")
.columns("TABLE_NAME", "PARTITION_NAME", "HIGH_VALUE", "\"interval\"")
.build(database);
...
JDBDT.builder(partitionsTable)
.sequence(...)
.nullValue("\"interval\"") It does not seem reasonable to me to discard the support of upper case keywords in column and/or table names. |
@Christoph-W Yes that's how it works and the documentation is not explicit. The overall scheme for escaped column names is currently fragile. |
@Christoph-W I have been examining this issue, trying to improve support for the upcoming 1.4.0 release but a small incremental fix at this time is not possible. The overall scheme will have to be re-examined in a future release. |
Given a database system view with column names being keywords can not be handled by JDBDT.
It is possible to create table tables meta data:
But using it during data preparation
fails with
org.jdbdt.InvalidOperationException: Invalid column name: '"INTERVAL"'.
Using
.remainingColumnsNull()
does not reuse the metadata correctly ending in not escaped column name usage withSyntax error in SQL statement
.Also alternative escaping with ` fails. Even enabling of
Option.CASE_SENSITIVE_COLUMN_NAMES
did not help.The text was updated successfully, but these errors were encountered: