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

r2dbc Unit Test - repository doesn't return anything after saving entity

I'm learning Reative jdbc with R2DBC MySQL. I have a repository like this: public interface UserRepository extends ReactiveCrudRepository { Mono findByEmail(String email); I created an unit test in order to test the…
AleGallagher
  • 1,745
  • 7
  • 30
  • 40
0
votes
1 answer

Changing PostgreSQL schema only active after reload of Spring Boot application

In my spring boot application, the first migration creates a schema for the current user and switches to this schema. Subsequent migrations are properly executed on this schema. However, after migration is complete, these tables are not found by the…
conspicillatus
  • 195
  • 3
  • 11
0
votes
0 answers

JSON_SET operation using Spring data relational Update fails with invalid json text

I am using R2dbc jasync driver to generate and execute update query on my mysql db table containing a json column. I am trying to do a JSON_SET operation on a column using R2dbcEntityTemplate and…
0
votes
1 answer

How to get results of select query in postgresql r2dbc?

I can execute this query just fine but I don't know how to extract the information returned by the select statement. Flux checkTableQuery = connectionMono.flatMapMany(connection -> connection .createStatement("select exists(\n"…
Adarsh
  • 11
  • 2
0
votes
1 answer

Setting up an integration test with r2dbc

import io.r2dbc.pool.ConnectionPool import io.r2dbc.spi.ConnectionFactory import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestInstance import…
Bao Thai
  • 533
  • 1
  • 6
  • 25
0
votes
1 answer

Spring Webflux - R2dbc : How to run a child query and update value while iterating a result set

I am new to Reactive repositories and webflux. I am fetching a list of data from DB, iterating it using map() to build a DTO class object, in this process I need to run another query to get the count value and update the same DTO object. When I try…
0
votes
0 answers

Spring boot Couldn't find PersistentEntity

My Repository @Repository public interface TasksRepository extends LcR2dbcRepository { default Flux findAllTasks(){ return SelectQuery.from(Task.class,"root") //Ic spring data r2dbc query …
Johns
  • 1
  • 1
0
votes
0 answers

R2dbc and Jdbc Probelm Spring Boot

Hi everyone I wrote a rest api using Spring Boot Webflux LabelController @RestController @RequestMapping("/api/label") @RequiredArgsConstructor public class LabelController { private final LabelService labelService; @GetMapping public…
0
votes
0 answers

How do I save two times in one request using webflux and r2dbc?

I use webflux with r2dbc. I try to save in two tables in one service, but there is only one actual save. There may be a way to do flatmap twice in the handler, but I want to use transaction in service. Handler.java Mono
HooMin.Lee
  • 115
  • 1
  • 8
0
votes
1 answer

How R2DBC Statement.fetchsize exaclty works

I am using the r2dbc-postgresql driver. Let's say we have a table with 1000 records and the fetchSize is 100: connectionMono.flatMapMany( connection -> connection .createStatement("select age from users") …
lkatiforis
  • 5,703
  • 2
  • 16
  • 35
0
votes
1 answer

r2dbc:Calling Stored Proc in mysql with in and out parameters

Does r2dbc currently supports calling Stored proc in my sql with in/out parameters ? I am trying to call Stored Proc using databaseClient which returns a String.But I am getting the below exception.Do I have to add anything to call SP from r2dbc.My…
Arnold
  • 73
  • 8
0
votes
1 answer

Spring data r2dbc error - Truncated incorrect DOUBLE value

I am using Spring data r2dbc and facing a strange issue. implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' runtimeOnly 'dev.miku:r2dbc-mysql' runtimeOnly 'mysql:mysql-connector-java' Getting error with update…
user1578872
  • 7,808
  • 29
  • 108
  • 206
0
votes
2 answers

Reactive Indexing from SQL Server to Elasticsearch with Spring

I wanted to use reactive spring to index data from a SQL Server database (using R2DBC) to Elasticsearch (using reactive Elasticsearch). I have an entity class corresponding to the table in SQL Server and I have a model class corresponding to the…
AFUEU
  • 23
  • 4
0
votes
1 answer

Flux returning only one value instead of all values

I have an issue with the following code whereby it only returns the first result for each table. @Service @Slf4j @Lazy @AllArgsConstructor public class QuizQueryService { R2dbcEntityOperations client; @Transactional(readOnly = true) public…
0
votes
1 answer

Cannot resolve method 'execute' in 'DatabaseClient'

I try to repeat the code from the course. SQL queries should be created for initialization and run in public void setup(), but I faced with some problems: Cannot resolve method 'execute' in 'DatabaseClient' Reference to 'create' is ambiguous, both…