可用版本:开发版 (3.21) | 最新版 (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14

Kotlin中的SQL构建

适用于 ✅ 开源版   ✅ 专业版   ✅ 企业版

jOOQ-kotlin 是一个 Maven 模块,用于为那些希望将 jOOQ 与 Kotlin 结合使用的用户利用一些高级 Kotlin 功能。

您可以使用以下依赖项集成它

Maven
Gradle (Kotlin)
Gradle (Groovy)
<dependency>
              <!-- Use org.jooq                for the Open Source Edition
                       org.jooq.pro            for commercial editions with Java 21 support,
                       org.jooq.pro-java-17    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 21 support,
                       org.jooq.trial-java-17  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.
                     Install the others locally using the provided scripts, or access them from here: https://repo.jooq.org
                     See the JDK version support matrix here: https://jooq.org.cn/download/support-matrix-jdk -->

  <groupId>org.jooq</groupId>
  <artifactId>jooq-kotlin</artifactId>
  <version>3.20.5</version>
</dependency>
dependencies {
             // Use org.jooq                for the Open Source Edition
             //     org.jooq.pro            for commercial editions with Java 21 support,
             //     org.jooq.pro-java-17    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 21 support,
             //     org.jooq.trial-java-17  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.
             //       Install the others locally using the provided scripts, or access them from here: https://repo.jooq.org
             //       See the JDK version support matrix here: https://jooq.org.cn/download/support-matrix-jdk

    implementation("org.jooq:jooq-kotlin:3.20.5")
}
dependencies {
             // Use org.jooq                for the Open Source Edition
             //     org.jooq.pro            for commercial editions with Java 21 support,
             //     org.jooq.pro-java-17    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 21 support,
             //     org.jooq.trial-java-17  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.
             //       Install the others locally using the provided scripts, or access them from here: https://repo.jooq.org
             //       See the JDK version support matrix here: https://jooq.org.cn/download/support-matrix-jdk

    implementation "org.jooq:jooq-kotlin:3.20.5"
}

以下各节重点介绍该模块中的一些有用的扩展。

请注意,即使没有该模块,您也可以利用许多 Kotlin 语言功能,使用普通的 jOOQ API,该 API 在设计时充分考虑了 Kotlin。 有关更多详细信息,请参阅此博客文章

反馈

您对此页面有任何反馈吗? 我们很乐意听取您的意见!

The jOOQ Logo