From 02a9a2677c93e04fe4c103a1cbf05e5f92ec1adc Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 11 Jul 2023 14:06:35 +0200 Subject: [PATCH] =?UTF-8?q?Add=20`PostgresqlResult.filter(=E2=80=A6)`=20ov?= =?UTF-8?q?errides=20to=20return=20`PostgresqlResult`=20instead=20of=20`Re?= =?UTF-8?q?sult`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [resolves #602] Signed-off-by: Mark Paluch --- .../java/io/r2dbc/postgresql/api/PostgresqlResult.java | 7 +++++++ .../java/io/r2dbc/postgresql/api/MockPostgresqlResult.java | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java b/src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java index 7065bcb64..13ab776bc 100644 --- a/src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java +++ b/src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java @@ -23,6 +23,7 @@ import reactor.core.publisher.Mono; import java.util.function.BiFunction; +import java.util.function.Predicate; /** * A {@link Result} representing the results of a query against a PostgreSQL database. @@ -41,4 +42,10 @@ public interface PostgresqlResult extends Result { @Override Flux map(BiFunction mappingFunction); + /** + * {@inheritDoc} + */ + @Override + PostgresqlResult filter(Predicate predicate); + } diff --git a/src/test/java/io/r2dbc/postgresql/api/MockPostgresqlResult.java b/src/test/java/io/r2dbc/postgresql/api/MockPostgresqlResult.java index 15e7a9a74..356992703 100644 --- a/src/test/java/io/r2dbc/postgresql/api/MockPostgresqlResult.java +++ b/src/test/java/io/r2dbc/postgresql/api/MockPostgresqlResult.java @@ -16,7 +16,6 @@ package io.r2dbc.postgresql.api; -import io.r2dbc.spi.Result; import io.r2dbc.spi.Row; import io.r2dbc.spi.RowMetadata; import org.reactivestreams.Publisher; @@ -56,7 +55,7 @@ public Flux map(BiFunction mappingFunction } @Override - public Result filter(Predicate filter) { + public PostgresqlResult filter(Predicate filter) { throw new UnsupportedOperationException(); }