如何将Oracle方言添加到DSLContext

huangapple go评论58阅读模式
英文:

How to add Oracle dialect to DSLContext

问题

无法在 jOOQ 的以下版本中获取 SQLDialect.Oracle:

<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);

如何将 Oracle 方言添加到我的代码中?(根本找不到 Oracle,但文档坚称各种版本的 Oracle 存在。)

如果在 Maven 版本中不可用,那么是否有办法在上述版本中使用它?

英文:

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

&lt;dependency&gt;
    &lt;groupId&gt;org.jooq&lt;/groupId&gt;
    &lt;artifactId&gt;jooq&lt;/artifactId&gt;
    &lt;version&gt;3.17.8&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.jooq&lt;/groupId&gt;
    &lt;artifactId&gt;jooq-meta-extensions&lt;/artifactId&gt;
    &lt;version&gt;3.17.8&lt;/version&gt;
&lt;/dependency&gt;
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

得分: 1

SQLDialect.ORACLE 在 jOOQ 专业版和企业版中可用,如下所列:
https://www.jooq.org/download/#databases

为了使用这些版本,您需要将您的 Maven groupId 从以下方式切换为:

&lt;groupId&gt;org.jooq&lt;/groupId&gt;

切换为,例如:

&lt;groupId&gt;org.jooq.pro&lt;/groupId&gt;

商业版可用的 groupIds 包括以下内容,在手册中的各种 Maven 示例中有文档记录

&lt;!-- 对于开源版本,请使用 org.jooq。
         对于支持 Java 17 的商业版本,请使用 org.jooq.pro。
         对于支持 Java 11 的商业版本,请使用 org.jooq.pro-java-11。
         对于支持 Java 8 的商业版本,请使用 org.jooq.pro-java-8。
         对于支持 Java 17 的免费试用版,请使用 org.jooq.trial。
         对于支持 Java 11 的免费试用版,请使用 org.jooq.trial-java-11。
         对于支持 Java 8 的免费试用版,请使用 org.jooq.trial-java-8。
         
     注意:只有开源版本托管在 Maven Central。
           其他版本需要手动从您的发行版导入。--&gt;
英文:

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:

&lt;groupId&gt;org.jooq&lt;/groupId&gt;

To this one, for example:

&lt;groupId&gt;org.jooq.pro&lt;/groupId&gt;

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

&lt;!-- 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 --&gt;

huangapple
  • 本文由 发表于 2023年2月23日 20:42:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/75544998.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定