Feature #2358
HQLPreprocessor and dialect specific functions
0%
History
#1 Updated by Ovidiu Maxiniuc almost 10 years ago
At this moment HQLPreprocessor
must preprocess the HQL code depending on the dialect.
The rtrim
function is replaced with a small tree for H2 and PostgreSQL. The SQL Server, however, requires a much larger tree to be constructed (documented in the code).
The issue is the place this code as P2JDialect
and HQLPreprocessor
are at this moment very disjoint. Normally, HQLPreprocessor
should call some function of the current dialect to perform the AST building for rtrim
function. On the other hand, P2JDialect
has nothing to do with AST building.
It would be nicer to have a pluggable resource that would generate the appropriate AST by dialect.
#2 Updated by Vadim Nebogatov about 9 years ago
- Status changed from New to WIP
#3 Updated by Ovidiu Maxiniuc about 9 years ago
- File om_upd20150401a.zip added
Vadim,
Please take a look at the attached version of the HQLPreprocessor
. It contains some further changes needed by SQLServer dialect. Most likely it won't compile with your current P2J, but please take note of changes at lines: 1340 and 1480 as an addition to 1293 where this dialect receives special treatment.
Should you have any questions, feel free to contact me.
#4 Updated by Vadim Nebogatov about 9 years ago
#5 Updated by Ovidiu Maxiniuc about 9 years ago
The reason for this task is not changing the rtrim
function support, but to extract the dialect specific code (to P2JDialect
implementations? or some other specialized class) in a way that will leave the HQLPreprocessor
class dialect independent.
#6 Updated by Eric Faulhaber about 8 years ago
- Target version set to 23
#7 Updated by Greg Shah over 7 years ago
- Target version deleted (
23)