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
0
votes
1 answer

Always Encrypted with R2DBC

I trying to save to a table with encrypted fields but I cannot find R2DBC support. Image of encrypted columns Found a similar question but without using R2DBC SQL Server Column Encryption using Azure Key Vault and Spring Boot JDBC documentation it…
0
votes
2 answers

Spring reactive programming and relational databases: using relationships

I'm new to the reactive programming paradigm, specifically Project Reactor within Spring. Back in the days when Hibernate was the most used ORM tool, we could use it to automatically create the relationships, such as one-to-many, many-to-many etc.…
Yves Calaci
  • 1,019
  • 1
  • 11
  • 37
0
votes
3 answers

r2dbc connection closed exception

Please help me understand and resolve why I am getting and error when I try to fetch first of many records that can be fetched by a SELECT SQL statement using r2dbc on mssqlserver db. My gradle dependencies: dependencies { implementation…
shaiksphere
  • 285
  • 1
  • 4
  • 12
0
votes
1 answer

R2DBC maps to do relationships between tables in a database

How to use maps in spring data R2DBC, to take map tables/entities with relationships received/sent to a database? Using r2dbcCustomConversions, @WritingConverter and @ReadingConverter. Someone could give.some.example? Thanks a lot
GtdDev
  • 748
  • 6
  • 14
0
votes
1 answer

Java r2dbc client execute sql and use returned id for next execute

I use r2dbc client with postgresql and I would like to call in one transaction 2 inserts(use id of first query) like: client.execute("INSERT INTO place(id,city) VALUES(:id, :city)") .bind("id", "nextval('place_id_seq')") .bind("city",…
user1089362
  • 546
  • 7
  • 29
0
votes
2 answers

How to implement saveAll using R2DBC-DatabaseClient?

How can I implement a saveAll method like in ReactiveCrudRepository using DatabaseClient? That's my implementation - Sadly it doesn't work. @Repository class AppStartRepo(val client: DatabaseClient) { suspend fun saveAll(starts: List) { …
Tien Do Nam
  • 3,630
  • 3
  • 15
  • 30
0
votes
1 answer

Change spring data r2dbc context to use R2dbcRepositories in a different database

How can I change spring data r2dbc repositories target-datatabase (maybe I am talking about 'Context')? Let me explain better. I am managing(ConnectionFactory Properties) 'connection factory' to execute SQL-DDL scripts in any database I want - OK;…
GtdDev
  • 748
  • 6
  • 14
0
votes
1 answer

r2dbc postgres driver - how to extract PostgresqlConnection from PooledConnection

Hi, my Spring Boot application has r2dbc connection pool autoconfigured using a property file: spring.r2dbc.url=r2dbc:pool:postgres://localhost:5432/ecom spring.r2dbc.username=xxx spring.r2dbc.password=yyy Now I need to get…
0
votes
0 answers

Numeric types mapping issue in Spring Data R2dbc with postgres

I tried to use Spring Data R2dbc/Postgres in a sample application. Spring Boot 2.4.0-M2 R2dbc Postgres (managed by Spring Boot) Spring Data R2dbc 1.2.0-M2(managed by Spring Boot) The table scripts. CREATE SEQUENCE IF NOT EXISTS…
Hantsy
  • 8,006
  • 7
  • 64
  • 109
0
votes
1 answer

R2dbcRepository BeanCreationException No property findAll found for type

I try to update the whole application and use the reactive programming approach with PostgreSQL, so I'm updating the repositories and make them extend from R2dbcRepository, updated also related services to handle Mono and Flux. When I try to run the…
skander
  • 109
  • 1
  • 13
0
votes
1 answer

repository binding problem with spring r2dbc

I try to use Spring R2DBC with postgres driver. I have the following repository: package fr.misc.database.repos.computed; import fr.misc.database.entities.computed.OrdreDeTravailPivotComputedEntity; import…
Adrien Ruffie
  • 195
  • 4
  • 16
0
votes
1 answer

Why the type of connectTimeout property of r2dbc-spi is java.time.Duration and how Can I use it in URL connection?

I'm using URL connection with application.yml file for my r2dbc connection. I tried to set connectTimeout property but got this error: Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.time.Duration…
심시은
  • 339
  • 1
  • 5
  • 21
0
votes
1 answer

ReaciveCrudRepository with Awaitility

writing tests and not sure how can one rewrite this code: SomeEntity entity = Awaitility.await() .atMost(1, TimeUnit.SECONDS) .until({ -> repository.findById(id) }, { entry -> entry.isPresent() }) .get() to…
user994612
  • 35
  • 5
0
votes
1 answer

Difference between io.r2dbc.pool.PoolingConnectionFactoryProvider.MAX_SIZE vs ConnectionPoolConfiguration max size in r2dbc

I am trying to understand the difference between 2 configurable parameters while creating a connection pool using r2dbc-pool. I was able to configure the connection pool with the help of the below post: Connection pool size with postgres…
0
votes
0 answers

Unable to run SQL script to initialize test data for Spring Boot test

I have a Spring Boot 2.3 reactive application with webflux and r2dbc. Normally it runs on MS Sql database. I want unit tests to run on H2. I got to the point when correct database driver is loaded based on which application.properties file is in use…
Dmitry
  • 35
  • 1
  • 6