How to add Oracle dialect to DSLContext

82 Views Asked by At

I'm not able to get SQLDialect.Oracle in the following version of jOOQ:

<dependency>
    <groupId>org.jooq</groupId>
    <artifactId>jooq</artifactId>
    <version>3.17.8</version>
</dependency>
<dependency>
    <groupId>org.jooq</groupId>
    <artifactId>jooq-meta-extensions</artifactId>
    <version>3.17.8</version>
</dependency>
Connection connection = entityManager.unwrap(Connection.class);
DSLContext context = DSL.using(connection, SQLDialect.Oracle);

How can I add the Oracle dialect into my code? (Oracle is not found at all, but documentation insists that various version of Oracle are present.

If it is not available in Maven versions, then is there a way to use it in above version?

1

There are 1 best solutions below

4
On

The SQLDialect.ORACLE is available in the jOOQ Professional Edition and jOOQ Enterprise Edition, as listed here: https://www.jooq.org/download/#databases

In order to use those editions, you have to switch your Maven groupId from:

<groupId>org.jooq</groupId>

To this one, for example:

<groupId>org.jooq.pro</groupId>

Available groupIds for the commercial editions include the following, as documented in the various Maven examples in the manual:

<!-- Use org.jooq                for the Open Source Edition
         org.jooq.pro            for commercial editions with Java 17 support, 
         org.jooq.pro-java-11    for commercial editions with Java 11 support,
         org.jooq.pro-java-8     for commercial editions with Java 8 support,
         org.jooq.trial          for the free trial edition with Java 17 support, 
         org.jooq.trial-java-11  for the free trial edition with Java 11 support, 
         org.jooq.trial-java-8   for the free trial edition with Java 8 support 
         
     Note: Only the Open Source Edition is hosted on Maven Central. 
           Import the others manually from your distribution -->