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

187 questions
16
votes
4 answers

R2DBC - Oracle Database Support

I found R2DBC when I was searching reactive relational database drivers, but I couldn't see any driver for Oracle DB. Does anyone have any information on whether to provide support?
Can
  • 161
  • 1
  • 4
15
votes
1 answer

How to implement OneToMany, ManyToOne and ManyToMany with R2DBC in a project which previously used JPA?

I have to re-implement a few back-end services and one of the main requirement is to make the whole flow reactive. Previously the services used hibernate with PostgreSQL so the mentioned connections were provided by the framework. Since I have to…
15
votes
2 answers

Why does Spring not provide reactive (non-blocking) clients for relational databases?

I've used Vert.x toolkit for creating reactive applications with support for relational DBs like MySQL and Postgres. I know Spring provides reactive support for some NoSQL DBs like Cassandra and Mongo but are they willing to provide the same for…
Mohamed Elsayed
  • 2,173
  • 1
  • 17
  • 34
9
votes
2 answers

reactive repository throws exception when saving a new object

I am using r2dbc, r2dbc-h2 and experimental spring-boot-starter-data-r2dbc implementation 'org.springframework.boot.experimental:spring-boot-starter-data-r2dbc:0.1.0.M1' implementation 'org.springframework.data:spring-data-r2dbc:1.0.0.RELEASE' //…
lapots
  • 9,619
  • 22
  • 96
  • 201
8
votes
1 answer

Is Micronaut Data with R2DBC a more scalable approach than classical “one thread per connection” model Micronaut Data JDBC

According to micronaut-data reactive guide, "... In the case of reactive execution and if the backing implementation is blocking, Micronaut Data will use the Configured I/O thread pool to schedule the query execution on a different thread. If the…
Jim C
  • 2,519
  • 13
  • 54
  • 105
8
votes
1 answer

How to join tables in r2dbc?

In java reactor, r2dbc. I have two tables A, B. I also have repositories for them defined. How can i get data made up of A join B? I only come up with the following approach: call databaseClient.select from A and consequently in a loop call select…
voipp
  • 700
  • 7
  • 21
8
votes
6 answers

Database migrations with R2DBC

I am new to R2DBC (https://r2dbc.io/). I would like to know whether r2dbc's ecosystem has a database migration tool/framework. It seems Liquibase & Flyway depend on JDBC. Is there a plan for allowing those frameworks to support a r2dbc driver? Any…
balteo
  • 20,469
  • 52
  • 196
  • 362
7
votes
0 answers

R2DBC unable to create connection with h2 protocol

I'm trying to leverage H2 for testing and have the following configuration in src/test/resources/application.yaml: spring: r2dbc: url: r2dbc:h2:file://testdb I have an empty test annotated with @SpringBootTest but when I run it I get the…
Jit B
  • 1,104
  • 10
  • 25
7
votes
2 answers

Log values of query parameters in Spring Data R2DBC?

In Spring Data R2DBC I can log SQL queries by using logging.level.org.springframework.data.r2dbc=DEBUG in the application.properties. However, this doesn't log the actual values that are bound as query parameters. How can I log the actual values…
Bernhard
  • 5,161
  • 6
  • 35
  • 78
6
votes
1 answer

Best practice of handling relations between tables in Spring Data R2dbc

I tried to create a user/roles relation in RDBMS and want to use R2dbc(Spring Data R2dbc) to shake hands with the backend database. Assume there are three tables, users, roles, and user_roles. @Table("users") class User { @Id private String…
Hantsy
  • 4,075
  • 3
  • 28
  • 61
6
votes
1 answer

r2dbc feasibility for production applications and future roadmap

I've been closely following r2dbc updates by pivotal and I wish to build my application using this approach. I have tried few small applications with r2dbc postgres driver as below :
Gaurav Varma
  • 1,939
  • 4
  • 18
  • 36
5
votes
1 answer

How to map One to Many / One to One to a POJO in Spring Data R2DBC

I am trying to replicate some functionality that I was using in Spring Data JPA in the new reactive Data r2dbc. I am aware that r2dbc is not a full-fledged ORM but wanted to understand as what could be the best way to replicate the below scenario in…
abstractKarshit
  • 1,045
  • 11
  • 26
5
votes
2 answers

How to configure schema for R2DBC PostgreSQL

I try to use Spring Data R2DBC with postgres. I know some configuration for url, username, password. spring.r2dbc.url spring.r2dbc.username spring.r2dbc.password Is there something for the schema? Any list of setting available?
robert trudel
  • 3,798
  • 12
  • 51
  • 90
5
votes
1 answer

Is it possible to implement a POJO in Spring Boot that has a field representing a composite primary key while not utilizing JPA or nested classes?

I am currently trying to implement R2DBC within Spring Boot for an application that is already far into development - meaning, unfortunately, our DDL is not flexible, since other microservices depend on this it and vice versa. One significant…
4
votes
1 answer

R2DBC and enum (PostgreSQL)

Update 15/08/2020: Looks like Enum support was added on Jun 16. R2DBC commit. Does H2DBC support PostgreSQL enums? I checked they git page but it doesn't mention anything about it. If it does, how enums could be used (INSERT, SELECT)? Lets say…
my-
  • 490
  • 5
  • 16
1
2 3
12 13