spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.39k stars 40.51k forks source link

Auto-configure jOOQ with R2DBC #30760

Open hantsy opened 2 years ago

hantsy commented 2 years ago

Jooq added official R2dbc support since 3.15 , see: https://blog.jooq.org/reactive-sql-with-jooq-3-15-and-r2dbc/

Add JooqAutoConfiguration for R2dbc support, including compatibility with the existing transaction, data types, converters etc.

wilkinsona commented 2 years ago

Recent jOOQ 3.x releases require Java 11 which makes upgraded problematic in 2.x where we have a Java 8 baseline. We may be able to look at this in 3.x.

rajadilipkolli commented 1 year ago

Since Springboot 3 has java 17 as base maybe it's time to relook

hantsy commented 1 year ago

jOOQ 3.18.0 is aligned with R2dbc 1.0 spec which is compatible with Spring Boot 3.x now, it is time to add R2dbc/Jooq Autoconfiguration.

giger85 commented 1 year ago

Is there any update this issue?

wilkinsona commented 1 year ago

@giger85 No, I'm afraid not. We work in the open so updates will appear in this issue when we have them. Right now, the issue is in the 3.x milestone. This means that we hope to work on it for a 3.x release but do not know when that will be. We have other, higher priority, items to focus on at the moment.

hantsy commented 1 year ago

I have used jOOQ and R2dbc in a project for over one year, it is easy to integrate them in projects yourself.

Just need to create a DslContext bean that based on the R2dbc ConnectionFactory.

https://github.com/hantsy/spring-r2dbc-sample/blob/master/jooq-kotlin-co-gradle/src/main/kotlin/com/example/demo/domain/JooqConfig.kt

But unfortunately, the Spring tx, R2dbc context mapping, etc are not applied to jOOQ SQL execution.

Our strategy is only using jOOQ for complex query(across multiple tables, Db built-in functions, etc.), all create/update/delete and simple query operations use the existing Spring Data R2dbc.

rajadilipkolli commented 9 months ago

@giger85 No, I'm afraid not. We work in the open so updates will appear in this issue when we have them. Right now, the issue is in the 3.x milestone. This means that we hope to work on it for a 3.x release but do not know when that will be. We have other, higher priority, items to focus on at the moment.

Hi @wilkinsona , I guess it is time to check in 3.3 as we are starting new journey from today