Using Jan 30th package.
select `#` from A works
but
select o.`#` from A o generates a lexical error. This is not correct behaviour IMHO.
Merci,
Martin
|
" is used to quote SQL identifiers. ' is for string constant.
"select '#' from A" means '#' as a constant value in select-list.
"select "#" from A" means "#" is a special column name in table a.
"select o."#" from o" means is supported but your table hasn't such a "#" column so that you will get "Invalid column: o.#" exception.
"select o.'#' from A o" can't be understood.
|
To clarify
` is a backtick, not a single quote. I am wrapping with a backtick (a common escape character)...
If ` is not an escape character then it should be ;p
Cheers,
Martin
|
Both of "select `#` from A" and "select o.`#` from A o" won't work. ` is not an escape character.
|
You can use any character in string value, except for '. For instance, 'Tom's dog' should be 'Toms''s dog'. That's all.
|
If you used "Statment.setEscapeProcessing(true)", and have a sql with "select\t\b'\\\x33\u0056' from a\r\n" in a file. Then HXTT DBF will convert it and begin syntax analysis. If you wish to test such a fuction, you have to use "select\\\t\\\b'\\\\\\\x33\\\u0056' from a\\\r\\\n" in your Java code, otherwise Java compiler will consume all \.
|
This is actually just an issue with Hibernate since if one uses the MySQL dialect is attempts to escape using the backtick character. It would be beneficial for your company to contribute a dialect fully supporting HXTT series drivers for the next hibernate release.
Thanks,
Martin
|
The latest Hibernate support package is at here.
|