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

R2dbc real time updates from relational DB

Does R2dbc support instant updates if some proces inserts, updates, deletes data directly from SQL databases? Or does it only support publishing of such events when data modification actions are done via R2dbc? When I tried running queries and…
2
votes
2 answers

R2DBC adjacency list get all children

I have a table which has id and parentId columns: i refer to this structure as an adjacency list. So, now i want to get all children of arbitrary id. Classic solution of this problem use recursion, for example here is Postgres procedure or CTE…
2
votes
1 answer

liquibase initialization with r2dbc config

Trying to run spring boot with r2dbc and init database. My build.gradle looks like: dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' implementation…
tarmogoyf
  • 298
  • 3
  • 17
2
votes
1 answer

How to query a subselect with sorting and pageable in R2dbcRepository

I am using R2dbcRepository and I think it does not support native queries. @Query(nativeQuery is giving an error. I cannot seem to find a solution for the query without going native since I have join tables, subselect query, and Pageable. I cannot…
sophie
  • 991
  • 2
  • 15
  • 34
2
votes
0 answers

updateTime column default is not working with Spring Webflux and H2 R2DBC

Using Spring webflux with H2-R2DBC and creating a course by adding the details in course table defined as below. CREATE TABLE IF NOT EXISTS course( id VARCHAR(40) PRIMARY KEY, name VARCHAR(40) NOT NULL, fee DECIMAL, updatedtime TIMESTAMP DEFAULT…
2
votes
0 answers

Spring data r2dbc update

I have a table with non-auto generated primary key which is basically a foreign key. So, using withId method as said in the documentation. https://docs.spring.io/spring-data/r2dbc/docs/1.2.3/reference/html/#reference Creating a new instance is…
user1578872
  • 7,808
  • 29
  • 108
  • 206
2
votes
1 answer

Can't connect to CockroachCloud Free (beta) Cluster from a Spring Data R2DBC driver

I created CrockroachCloud Free (beta) Cluster and I was able to connect to the DB with the command line. But when I tried to connect from a Spring Data R2DBC driver I get an exception. I'm using following connection string in my…
2
votes
1 answer

Spring R2DBC DatabaseClient losing TZ information

I have a db entity with some Instant type fields. org.springframework.data.r2dbc.core.DatabaseClient (which is now deprecated), had a method .as(..) to automatically map to a java entity and it honoured the timezones too. Not sure how that happened…
Shobhit Tyagi
  • 93
  • 1
  • 9
2
votes
1 answer

Specify a schema using r2dbc-mssql

Is there any way to specify a default schema in a properties file using r2dbc-mssql? The connection works fine with: spring: r2dbc: url: 'r2dbc:mssql://zzzzz.database.windows.net:1433/dbname' username: 'xxxxxx' password: 'xxxxxx' but…
Pierre Recuay
  • 83
  • 1
  • 7
2
votes
0 answers

Reactive Global Transaction with multiple databases (MySQL, MongoDB)

I'm using MYSQL with R2DBC (with spring-data-r2dbc and jasync-r2dbc-mysql) and Reactive Mongo with spring-data-mongo-reactive. I want to set transaction which includes both operations. At first, I considered JTA and ChainedTransactionManager but as…
2
votes
0 answers

Unable to open connection pool to SQL Server through r2dbc

I'm getting an error when I'm trying to get a SQL Server connection pool. Maven: 4.0.0 org.springframework accessing-data-r2dbc 0.1.0
Bananin
  • 21
  • 2
2
votes
0 answers

performance issue for spring r2dbc

Problem : slowness observed during first 1 sec only and the remaining 59 have a constant response time which 90% better than the max response time. Server Env details: spring boot webflux with r2dbc pool deployed in ECS fargate and connecting to…
2
votes
2 answers

How to set up database connection in r2dbc?

How to set up a PostgreSQL database connection in r2dbc Spring boot project? I have tried the below configuration, it connects to the database but it's not returning any values @Configuration @EnableR2dbcRepositories public class DatabaseConfig…
Thirumal
  • 8,280
  • 11
  • 53
  • 103
2
votes
1 answer

Unable to run test for r2dbc with spring boot

I am following this link to implement R2DBC with spring data. That project has huge POM as it demos other features too. So I try to have only dependencies I need for spring boot and R2DBC with H2. My pom is as:
Mandroid
  • 6,200
  • 12
  • 64
  • 134
2
votes
1 answer

Find/Modify/Save or Upsert with Spring Data R2DBC

I'm trying to wrap my head around reactive programming, specifically with Spring and Spring Data R2DBC. One thing that would help me understand it better is to do a find/modify/save or "upsert" of an object. A traditional interaction might look…
SingleShot
  • 18,821
  • 13
  • 71
  • 101