Skip to content

Commit 02a9a26

Browse files
committed
Add PostgresqlResult.filter(…) overrides to return PostgresqlResult instead of Result.
[resolves #602] Signed-off-by: Mark Paluch <[email protected]>
1 parent ceea9e1 commit 02a9a26

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import reactor.core.publisher.Mono;
2424

2525
import java.util.function.BiFunction;
26+
import java.util.function.Predicate;
2627

2728
/**
2829
* A {@link Result} representing the results of a query against a PostgreSQL database.
@@ -41,4 +42,10 @@ public interface PostgresqlResult extends Result {
4142
@Override
4243
<T> Flux<T> map(BiFunction<Row, RowMetadata, ? extends T> mappingFunction);
4344

45+
/**
46+
* {@inheritDoc}
47+
*/
48+
@Override
49+
PostgresqlResult filter(Predicate<Segment> predicate);
50+
4451
}

src/test/java/io/r2dbc/postgresql/api/MockPostgresqlResult.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package io.r2dbc.postgresql.api;
1818

19-
import io.r2dbc.spi.Result;
2019
import io.r2dbc.spi.Row;
2120
import io.r2dbc.spi.RowMetadata;
2221
import org.reactivestreams.Publisher;
@@ -56,7 +55,7 @@ public <T> Flux<T> map(BiFunction<Row, RowMetadata, ? extends T> mappingFunction
5655
}
5756

5857
@Override
59-
public Result filter(Predicate<Segment> filter) {
58+
public PostgresqlResult filter(Predicate<Segment> filter) {
6059
throw new UnsupportedOperationException();
6160
}
6261

0 commit comments

Comments
 (0)