Questions tagged [r2dbc]

R2DBC (Reactive Relational Database Connectivity) is an SPI which enables interacting with SQL database servers by executing SQL statements using a non-blocking reactive programming model with the Java programming language.

R2DBC is a Java-based, open source data access technology.

This technology is an SPI (Service Provider Interface) for the Java programming language that defines how a client may access a database using reactive programming. It specifies SPI methods for executing queries using a non-blocking driver. R2DBC is oriented towards relational databases.

Online resources

379 questions
2
votes
0 answers

How to parse Postgresql 'Infinity' timestamp in R2JDBC?

How to parse infinity in R2JDBC? Getting the following error java.time.format.DateTimeParseException: Text 'infinity' could not be parsed at index 0 at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2052)…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
2
votes
3 answers

Bad SQL grammar - Spring data R2DBC with Oracle

I'm using Spring Data R2DBC with Oracle 11g and I have the following error using method findById of R2dbcCrudRepository executeMany; bad SQL grammar [SELECT GAME_PHASE.* FROM GAME_PHASE WHERE GAME_PHASE.ID = :P0_id FETCH FIRST 2 ROWS ONLY] This is…
Alessio Fiore
  • 467
  • 1
  • 7
  • 18
2
votes
0 answers

Generic R2DBC Custom Converter

I am using postgres database with reactive repository and R2dbc and have more than 5 json fields. R2dbc does not directly recognize the jsonb fields and hence cannot map it to java object. So after following various docs - I came to know a solution…
Drashti Dobariya
  • 2,455
  • 2
  • 10
  • 23
2
votes
0 answers

ReactiveCrudRepository Criteria Query

I want to discuss a bit further the usage of Criteria and ReactiveCrudRepository. Spring data r2dbc supports query by example. Which in many cases is too limited. For example, all types other than String are exact-match only. Navigating the issues…
2
votes
2 answers

Getting reactor.pool.PoolShutdownException during save in database

Service is using org.springframework.r2dbc.core.DatabaseClient with reactor-pool and r2dbc-mysql driver. I'm doing inserts in the database every 5-10 seconds (50-100 insert statements) and randomly after every 2-3 hours I'm getting…
Vladlen Gladis
  • 1,699
  • 5
  • 19
  • 41
2
votes
1 answer

How to reuse a `testcontainers` container with two different drivers?

I'm using both r2dbc and Liquibase in the same application. However, Liquibase is not able to run migrations using r2dbc so I need to use a separate jdbc driver just for it. I followed the solution here, and used testcontainers for testing, so my…
Haf
  • 375
  • 1
  • 3
  • 13
2
votes
1 answer

How to zip nested lists with reactor and R2dbc

I have 3 tables in a postgres data base and am using R2dbc to query and connect them in a relational manner. I have 3 entity classes (possibly shouldn't be data classes, but shouldn't effect the example) @Entity @Table(name = "parent", schema =…
2
votes
1 answer

Spring Boot and R2DBC: io.r2dbc.spi.R2dbcNonTransientResourceException: Connection validation failed

I'm using Spring Boot 2.4.9 with WebFlux and R2DBC, deployed using the standard Netty server. The database is PostgreSQL. There is only one R2DBC repository class in the app. R2DBC is configured in application.properties with these…
user3303372
  • 761
  • 1
  • 10
  • 21
2
votes
1 answer

Spring data R2DBC - Custom converters not picked up when connecting to multiple databases

The application I am working on is connecting to 2 postgresql databases at the same time. The application is trying to perform an insert in a table with 3 columns on one of the two databases. The columns of the table are a string, a json and a…
Antonio
  • 61
  • 7
2
votes
1 answer

Does `ResultQuery#fetchAsync()` work with r2dbc in jOOQ 3.15.1?

I am wanting to use non-blocking r2dbc without 'using a third party reactive stream API', and currently have this working when I configure the DSLContext with JDBC (ie. all the records are printed): // appended to a jOOQ select query …
David Bullock
  • 6,112
  • 3
  • 33
  • 43
2
votes
0 answers

Does r2dbc repository support dynamic SQL conjecture?

I was migrating traditional JPA based project to reactive Project, which was based on r2dbc. There have many dynamics SQL conjecture in our project before, like if user pass parameter exchange value as CME,we will add "and exchange='CME'" at the end…
Jason
  • 25
  • 6
2
votes
1 answer

where can I find documentation of r2dbc metrics?

Where can I find in depth descriptions of the r2dbc metrics? Specifically I try to understand what exactly these…
Stuck
  • 11,225
  • 11
  • 59
  • 104
2
votes
3 answers

Filtering query with R2DBC

I need do a filtering query with some query parameter. I need that if the query parameter is null, the condition of the query (= or LIKE, for example) is not evaluated and return me everything. I'm using R2DBC and I don't find a way to solve it.
2
votes
2 answers

r2dbc-pool connection not released after cancel

I have a strange behaviour with R2DBC Pool: We happen to create a large number of threads and send them to the R2DBC pool to acquire a DB connection. When all of the R2DBC connections from the pool are in use, the threads that we created queue for…
2
votes
3 answers

Jooq reactive fetching using r2dbc driver

My query looks like (using JOOQ v 3.15): override fun getCredentialsById(id: Long): Mono { return Mono.from { dsl.select( USER_CREDENTIALS.ID, USER_CREDENTIALS.EMAIL, …
Yaroslav
  • 67
  • 2
  • 8