Questions tagged [r2dbc-postgresql]

For questions regarding the PostgreSQL implementation of the R2DBC SPI. See also tags "r2dbc" and "postgresql".

Refers to the PostgreSQL implementation of the R2DBC SPI. Refer to the tag info for r2dbc for information on Reactive Relational Database Connectivity Service Provider Interface and refer to tag info for postgresql for information on PostgreSQL object-relational database management system.

103 questions
0
votes
0 answers

Does Mono.fromSupplier lead to identical results as using R2DBC

Imagine you have a Postgres database. The driver in use is blocking. To move the resource access into reactive world, you wrap the blocking call in a Mono: Mono.fromSupplier { repository.find(id) } According to the r2dbc docs the connection itself…
nykon
  • 504
  • 4
  • 18
0
votes
0 answers

How to Mock r2dbcEntityTemplate.getDatabaseClient().sql method in DaoImpl for Unit Test

I want to Mock the r2dbcEntityTemplate and Unit Test the DaoImpl class. I have the DaoImpl class with definition: public class StudentDaoImpl implements StudentDao{ private final R2dbcEntityTemplate r2dbcEntityTemplate; @Override public…
0
votes
1 answer

io.r2dbc.spi.R2dbcBadGrammarException: Duplicate column name "?column?"; SQL statement

I try to test my code with H2 DB. I've some migrations for all steps(init, schema, data). For running my migrations I use nkonev r2dbc-migrate When I try to run a test I catch an exception "SQL Grammar exception" with means that H2 doesn't work with…
0
votes
2 answers

How to select the correct TransactionManager when using R2DBC together with Flyway and JDBC

Setup: micronaut 3.7.2 micronaut-data 3.8.1, micronaut-data-r2dbc, r2dbc-postgresql 0.9.2 Flyway 8.5.13, micronaut-jdbc-hikari, micronaut-flyway 5.4.1, postgresql 42.5.0 testcontainers (jdbc, r2dbc, postgresql) 1.17.5 io.micronaut.test-resources…
0
votes
0 answers

R2DBC AWS Postgres Select and Update X rows

I have a single table in a Postgres Database used for items in an inventory. The items can be available or allocated. What I want to do is to allocate x items where x can be really large: up to 500k. Crud Repo: @Query("select * from items " + …
0
votes
0 answers

Composite key on spring-boot r2dbc postgresql?

I have a composite key which i consider in a same time as primary key and composite key storeId addressId customerId How i can create my entity and my repository based on above information and using r2dbc and postgresql ??
DrDray
  • 55
  • 5
0
votes
0 answers

Connection Acquiring Timing out despite idle connections

We are using r2dbc-pool for our application, along with Jooq. The ConnectionFactory is as follows ConnectionFactoryOptions.Builder connectionFactoryBuilder =…
0
votes
0 answers

Wait for all connections to become idle in a connection pool (r2dbc pool)

I am currently working on integrating IAM DB authentication with my database. Details are as follows: Database: AWS RDS Postgres Database Mapping: Jooq Interface: R2DBC SPI We maintain a connection pool of 20 connections in our java application.…
0
votes
0 answers

R2DBC-MSSQL how to connect to a database

I am trying to connect to my local SQL Server with R2DBC, unfortunately, I do not know where I am going wrong, I have a lot of experience with R2DBC, I use it all the time with other databases but this is my first time with MSSQL, below is my MSSQL…
0
votes
2 answers

Problem with gradle when importing io.r2dbc.postgresql.codec

Every time i try to build or run from gradle (gradle bootRun or ./gradlew bootRun), while importing io.r2dbc.postgresql.codec.Json, i get this error: Stack trace > Task :compileJava…
0
votes
1 answer

R2DBC pool closes all connections before each query

We're using the latest versions of spring-data-r2dbc, r2dbc-pool and r2dbc-postgresql for connecting to a PostgreSQL database using a connection pool. We noticed some high response times, much higher than the query response times taken from the…
Anakin001
  • 1,226
  • 2
  • 14
  • 30
0
votes
1 answer

Spring r2dbc composite support

It seems Spring r2dbc does not support Composite Primary Key / Embedded Classes. What other options or work around can be followed in this case? If i have a table which has Composite Key, then how can I get Flux of objects using partial key, may be…
Spartacus
  • 337
  • 4
  • 12
0
votes
1 answer

Unexpected NoSuchMethodError RowMetadata.getColumnMetadatas() - In spite of correct dependencies

When running my application (Spring Boot 2.5.7) - after updating to spring-data-r2dbc 1.3.7, I get the NoSuchMethodError RowMetadata.getColumnMetadatas(). (I have also tried this with 1.4.0 - 1.3.7 is where the problem first surfaces.) In this…
0
votes
0 answers

How to JOIN (alternative to Mapping) multiple tables in Spring Webflux (IntelliJ) (Postgres database)?

How to Join multiple tables in Spring WebFlux for Relational Database? In Spring Boot, in order to join two tables, we can perform different mappings (@OneToOne, @ManyToOne, @OneToMany). One example is shown below for mapping between doctor and…
0
votes
0 answers

R2DBC: How to bind data class for sql query without needing all parameters?

I am trying to bind my data class for a sql query but I am getting a error when I am not using all the parameters from my data class. Is there a way to check in the sql query which parameters needs binding and which ones do not or allow to bind…
MrAndre
  • 811
  • 1
  • 10
  • 26