spring-data-r2dbc

R2DBC and enum (PostgreSQL)

穿精又带淫゛_ 提交于 2020-06-01 12:32:27
问题 Does H2DBC support PostgreSQL enums? I checked they git page but it doesn't mention anything about it. If it does, how enums could be used (INSERT, SELECT)? Lets say PostgreSQL enum CREATE TYPE mood AS ENUM ('UNKNOWN', 'HAPPY', 'SAD', ...); Java class @Data public class Person { private String name; private Mood mood; // ... enum Mood{ UNKNOWN, HAPPY, SAD, ...} } I tried: // insert var person = ...; client.insert() .table("people") .using(person) .then() .subscribe(System.out::println); //

R2DBC and enum (PostgreSQL)

旧时模样 提交于 2020-06-01 12:32:06
问题 Does H2DBC support PostgreSQL enums? I checked they git page but it doesn't mention anything about it. If it does, how enums could be used (INSERT, SELECT)? Lets say PostgreSQL enum CREATE TYPE mood AS ENUM ('UNKNOWN', 'HAPPY', 'SAD', ...); Java class @Data public class Person { private String name; private Mood mood; // ... enum Mood{ UNKNOWN, HAPPY, SAD, ...} } I tried: // insert var person = ...; client.insert() .table("people") .using(person) .then() .subscribe(System.out::println); //

How to join tables in r2dbc?

◇◆丶佛笑我妖孽 提交于 2020-05-15 08:47:05
问题 In java reactor, r2dbc. I have two tables A, B. I also have repositories for them defined. How can i get data made up of A join B? I only come up with the following approach: call databaseClient.select from A and consequently in a loop call select from B. But i want more efficient and reactive way. How to do it? 回答1: TL;DR: Using SQL. Spring Data's DatabaseClient is an improved and reactive variant for R2DBC of what JdbcTemplate is for JDBC. It encapsulates various execution modes, resource

You have defined query method in the repository but you don't have any query lookup strategy defined. spring

拥有回忆 提交于 2020-03-25 22:37:53
问题 Have an issue starting up a postgresql r2dbs spring boot application. I am getting the below error for this configuration.: Inside main module: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-core</artifactId> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-r2dbc</artifactId> </dependency>

You have defined query method in the repository but you don't have any query lookup strategy defined. spring

走远了吗. 提交于 2020-03-25 22:35:34
问题 Have an issue starting up a postgresql r2dbs spring boot application. I am getting the below error for this configuration.: Inside main module: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-core</artifactId> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-r2dbc</artifactId> </dependency>