Skip to content

Commit

Permalink
Add PostgresqlResult.filter(…) overrides to return `PostgresqlResul…
Browse files Browse the repository at this point in the history
…t` instead of `Result`.

[resolves #602]

Signed-off-by: Mark Paluch <[email protected]>
  • Loading branch information
mp911de committed Jul 11, 2023
1 parent 31fff3a commit 62a75da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -41,4 +42,10 @@ public interface PostgresqlResult extends Result {
@Override
<T> Flux<T> map(BiFunction<Row, RowMetadata, ? extends T> mappingFunction);

/**
* {@inheritDoc}
*/
@Override
PostgresqlResult filter(Predicate<Segment> predicate);

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,7 +55,7 @@ public <T> Flux<T> map(BiFunction<Row, RowMetadata, ? extends T> mappingFunction
}

@Override
public Result filter(Predicate<Segment> filter) {
public PostgresqlResult filter(Predicate<Segment> filter) {
throw new UnsupportedOperationException();
}

Expand Down

0 comments on commit 62a75da

Please sign in to comment.