Stephan van Hulst wrote:I don't know if this is exactly what you are looking for, but maybe you can take a look at JOOQ. I know you can use it to generate SQL for a number of dialects, but it's been a while since I've used it.
Tim Holloway wrote:Hibernate uses a "dialect" plugin to deal with the variances in SQL and DDL that occur from one DBMS brand to another.
If I understand the question, you'd like to do something similar, but do brute-force JDBC instead of using the ORM.
I would advise against that, if that's what you have in mind.
People think that if they use low-level functions directly, they can produce more efficient code than a machine can. But that is something that doesn't hold true once you start scaling up. In fact, benchmarks have indicated that an ORM can easily be twice as efficient as raw JDBC.
Tim Holloway wrote:
And, if neither of the above applies, you could always write your own code to invoke the Hibernate dialect translators. Hibernate is, after all, open-source.
Claude Moore wrote:DIY =do it yourself?