Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14

This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.

SQL building in Kotlin

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

jOOQ-kotlin is a maven module used for leveraging some advanced Kotlin features for those users that wish to use jOOQ with Kotlin.

You can integrate it using the following dependency:

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://www.jooq.org/download/support-matrix-jdk -->

  <groupId>org.jooq</groupId>
  <artifactId>jooq-kotlin</artifactId>
  <version>3.20.0-SNAPSHOT</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://www.jooq.org/download/support-matrix-jdk

    implementation("org.jooq:jooq-kotlin:3.20.0-SNAPSHOT")
}
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://www.jooq.org/download/support-matrix-jdk

    implementation "org.jooq:jooq-kotlin:3.20.0-SNAPSHOT"
}

The following sections highlight a few useful extensions from that module.

Note that even without that module, you can take advantage of a lot of kotlin language features using vanilla jOOQ API, which has been designed with a strong kotlin focus, in mind. For more details, see this blog post.

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo