Use jOOQ.x in your project
To use jooqx
add the following dependency
to the dependencies
section of your build descriptor:
Maven
In your pom.xml
,
<dependencies>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>3.14.13</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>4.3.5</version>
</dependency>
<dependency>
<groupId>io.github.zero88</groupId>
<artifactId>jooqx</artifactId>
<version>2.0.0-rc1</version>
</dependency>
<!-- For some SPI includes specific converter based on Vert.x database client -->
<dependency>
<groupId>io.github.zero88</groupId>
<artifactId>jooqx-spi</artifactId>
<version>2.0.0-rc1</version>
</dependency>
</dependencies>
Gradle
In your build.gradle
,
dependencies {
api("org.jooq:jooq:2.0.0-rc1")
api("io.vertx:vertx-core:4.3.5")
api("io.github.zero88:jooqx:2.0.0-rc1")
// For some SPI includes specific converter based on Vert.x database client
api("io.github.zero88:jooqx-spi:2.0.0-rc1")
}
Remarks
jooqx is only depended on 3 main libraries
|
Adding this jooqx
library JAR will not automatically add a database driver
JAR to your project. You should ensure that your project also has a suitable database driver
as a dependency.
For example:
-
With
legacy JDBC
and connecting toMySQL
driver
dependencies {
api("mysql:mysql-connector-java:8.0.23")
// It is recommendation to use HikariCP instead of c3p0
api("com.zaxxer:HikariCP:4.0.2")
api("io.vertx:vertx-jdbc-client:4.3.5") {
exclude("com.mchange")
}
api("io.github.zero88:jooqx:2.0.0-rc1")
}
-
With
reactive PostgreSQL
client
dependencies {
api("io.vertx:vertx-pg-client:4.3.5")
api("io.github.zero88:jooqx:2.0.0-rc1")
}
-
With
reactive JDBC
client andH2
dependencies {
api("com.h2database:h2:1.4.200")
// Agroal pool - Default in Vertx SQL client - Not yet has alternatives
api("io.agroal:agroal-pool:1.9")
api("io.vertx:vertx-sql-client:4.3.5")
api("io.github.zero88:jooqx:2.0.0-rc1")
}
Reactive version
Reference to reactive version for more detail.