Questions tagged [spring-data-r2dbc]

Spring Data R2DBC is a module of Spring Data based on R2DBC R2DBC stands for Reactive Relational Database Connectivity.

See https://spring.io/projects/spring-data-r2dbc for more information.

412 questions
1
vote
1 answer

Spring data r2dbc and group by

I am using the DatabaseClient to perform my sql queries and I don't see how I can do a group by: databaseClient.select() .from( myClass.class ) .matching( where( "row_1" ).is( "value_1" ) ) //group by row_2…
Zrom
  • 1,192
  • 11
  • 24
1
vote
1 answer

R2DBC - how it works in reality?

I've started to learn Reactive paradigm, so I'm pretty new in this topic. I created a sample app which uses Spring R2DBC to connect to PostgreSQL DB. I created a Rest Controller for fetching and saving data in DB to better understand a concept. I…
Viper
  • 597
  • 1
  • 8
  • 24
1
vote
1 answer

Reactive JDBC Driver for RDS Aurora Serverless

I have reactive micro service that talks to AWS RDS Aurora serverless. I want to know if there are any JDBC drivers that are non blocking for this like r2dbc.
1
vote
1 answer

Spring R2DBC proper way to initialize database with postgres

I have the following code: @Component public class TemplateDatabaseLoader { private Logger LOGGER = LoggerFactory.getLogger(TemplateDatabaseLoader.class); @Bean public CommandLineRunner demo(DatabaseClient databaseClient, ItemRepository…
Bubbleshadow
  • 196
  • 1
  • 3
  • 10
1
vote
0 answers

Interval Task leads to IDLE Connection Exhaustion in R2DBC

I am using reactor java to run a periodic task against Postgres using r2dbc as follows; Flux.interval(Duration.ofMillis(1000)).doOnNext(i->{ System.out.print("TIME HAS TICKED\n"); Flux.range(0,10).flatMap(j->{ …
AmitGCM
  • 11
  • 1
1
vote
1 answer

Transactions using r2dbc-postgresql

I am trying to generate a code that performs 2 postgresql commands simultaneously, in one transaction. I have in my DB 2 rules with different rule order, and I want to switch the rule order between them. I am using r2dbc-postgresql (v0.8.4) and…
1
vote
1 answer

Is there any way to work with JdbcTemplate and Query/Criteria Fluent API

R2dbcEntityTemplate has a method called select that allows me to use org.springframework.data.relational.core.query.Query to build my query statement using a Fluent API. I'm looking for a way to use this Fluent API on spring-data-jdbc in a non…
1
vote
1 answer

SpringBoot @Autowire not working inside @Repository

I have a multi module SpringBoot app with gradle and kotlin, trying spring-data-r2dbc. If i use @Repository annotation over my Repository class, @Autowired DatabaseClient is null. But if i change annotation to @Component, @Autowired works and I do…
Michal
  • 803
  • 2
  • 9
  • 26
1
vote
3 answers

R2dbcDataAutoConfiguration conflicts with AbstractR2dbcConfiguration on bean 'r2dbcDatabaseClient' bean creation

Need help @Configuration @EnableR2dbcRepositories(basePackages = "com.paymentservice.repository", databaseClientRef = "databaseClient") public class PaymentR2dbcConfiguration extends AbstractR2dbcConfiguration { …
1
vote
1 answer

Check database for access in Spring Gateway Pre filter

I am using Spring Gateway, where I need to check further user access by Request path using DB call. My repository is like this. public Mono getByUri(String url) .... This is my current filter where I am using custom…
1
vote
1 answer

Spring R2DBC: Save new entity if id is zero

I am migrating from the traditional JPA code base and facing a problem where a new entity cannot be saved by setting id to zero. Here is my schema (PostreSQL): CREATE TABLE my_user ( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL ); In…
Tien Do Nam
  • 3,630
  • 3
  • 15
  • 30
1
vote
0 answers

R2DBC - MssqlNonTransientException causing onErrorDropped

I am quite fresh in reactive world and recently come across quite odd problem, context: using spring data with R2DBC, on MS SQL running on SB 2.3, OpenJDK 14 (dependencies below) using transactional via annotations using "repositories" built purely…
asceta
  • 272
  • 1
  • 4
  • 10
1
vote
1 answer

R2DBC spring postgres enum mapping

I'm new to spring r2dbc. Previously I've user hibernate. In hibernate when you need to map postgresql enum to java enum you just add com.vladmihalcea:hibernate-types-52 and use @Enumerated (as shown bellow). Related to R2DBC and enum (PostgreSQL) SO…
Petar Toshev
  • 67
  • 1
  • 1
  • 9
1
vote
1 answer

Update using @Query not updating data in ReactiveCrudRepository

I am using ReactiveCrudRepository with Spring web flux. Following query is not updating data in a Postgres database with r2dbc. I tried initially without @Modifying also. I used this annotation with reference of this…
1
vote
1 answer

Unable get response with R2DBC Postgresql WebFlux

I am learning R2DBC with spring boot WebFlux and Postgresql. I have successfully configured with PostgreSQL database which is running on my local machine. I used the following dependencies and plugins. plugins { id 'org.springframework.boot'…