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
6
votes
3 answers

Missing DatabaseClient in Postgres spring boot R2dbc application

I have the following error coming up: Exception: Error creating bean with name 'inventoryService' defined in URL [jar:file:/app.jar!/BOOT-INF/classes!/com/epi/services/inventory/items/InventoryService.class]: Unsatisfied dependency expressed through…
mangusbrother
  • 3,988
  • 11
  • 51
  • 103
6
votes
2 answers

How do I handle nullable fields using either the Mono or the DatabaseClient provided by R2dbc in Spring?

I am at a loss for how to contruct an efficient query in R2dbc (java) using spring-webflux (reactive). Using the DatabaseClient object provided by R2dbc (or alternatively, a Connection object), it seems that I am only able to call different…
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 :
Crickcoder
  • 2,135
  • 4
  • 22
  • 36
5
votes
1 answer

Does R2DBC support the "ApplicationIntent=ReadOnly" parameter for SQL Server connections?

I'm working on a project that utilizes the R2DBC library for reactive database access. However, I'm unsure if R2DBC supports the ApplicationIntent=ReadOnly parameter for SQL Server connections. This parameter is typically used in Microsoft SQL…
5
votes
1 answer

Designing one-to-one and one-to-many relationships in Spring Data R2DBC

I am exploring possible ideas when it comes to designing the one-to-one and one-to-many relationships while using Spring Data R2DBC. As Spring Data R2DBC still do not support relationships natively there is still a need to handle those on our own…
Lisek
  • 753
  • 2
  • 11
  • 31
5
votes
1 answer

Spring data r2dbc for many to many mapping

I am using Spring data r2dbc and it doesn't support many to many mapping. Tables :- user user_role user_role_mapping As usual, one user can have multiple mapping. Sql query, select * from user u, user_role_mapping urm, user_role ur where u.user_id…
user1578872
  • 7,808
  • 29
  • 108
  • 206
5
votes
1 answer

Get fail constraint name from DataIntegrityViolationException with spring-data-r2dbc and postgresql

I have some constraints in a postgresql database (unique, foreign key...). I use spring data r2dbc repository : ReactiveCrudRepository I would like to transform the DataIntegrityViolationException throw by the repository to some custom exception…
fpa
  • 51
  • 3
5
votes
2 answers

how to use EnumCodec in r2dbc-postgresql

I am trying to use EnumCodec from the latest version of r2dbc-postgresql (0.8.4) unsuccessfully, and I wondered if you could help me. I use also spring-data-r2dbc version 1.1.1. I took the exact example from the GitHub and created an enum type…
eladya
  • 83
  • 1
  • 5
5
votes
1 answer

Spring Data R2DBC how to query hierarchical data

I am new to Reactive programming. I have to develop a simple spring boot application to return a json response which contains the company details with all its sub companies and employees Created a spring boot application (Spring Webflux + Spring…
5
votes
0 answers

Spring Data R2DBC - Backpressure not taken into account?

This thread is a continuation of the Github issue at: https://github.com/spring-projects/spring-data-r2dbc/issues/194 Context: Hi, I just tried a very simple Exemple, based on two reactive repositories: Given br, a r2dbc crud repo, and cr, another…
cambierr
  • 391
  • 4
  • 14
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

Spring R2DBC doesn't support multiple host/failover

I'm using spring r2dbc in my project and trying to make it work with multiple host/failover postgres topology; in other words, where the db url is like this: r2dbc:postgresql:failover://host1,host2,host3:port/ I'm using 2.7.5 version of spring boot,…
mr.nothing
  • 5,141
  • 10
  • 53
  • 77
4
votes
1 answer

support for sequence generation in r2dbc?

I am trying to find whether there is any support for identifier generation support we can use with R2DBC. Similar to @GeneratedValue provided by hibernate for jdbc. I know that spring-data-r2dbc doesn't support identifier generation yet.
4
votes
1 answer

Spring R2dbc: Is there are way to get constant stream from postgresql database and process them?

I want to fetch records for newly created records in a table in postgresql as a live/continuous stream. Is it possible to use using spring r2dbc? If so what options do I have? Thanks
4
votes
2 answers

Reactive R2DBC for simple RESTful calls

Since R2DBC is reactive and non blocking I would like to understand the benefit of using R2DBC in a simple RESTful CRUD service Assume a spring boot application is exposing a RESTful service using a repository below public interface…
lives
  • 1,243
  • 5
  • 25
  • 61
1 2
3
25 26