diff --git a/vertx-sql-client/src/main/java/io/vertx/sqlclient/RowSet.java b/vertx-sql-client/src/main/java/io/vertx/sqlclient/RowSet.java index 5c012ef2b..749e099be 100644 --- a/vertx-sql-client/src/main/java/io/vertx/sqlclient/RowSet.java +++ b/vertx-sql-client/src/main/java/io/vertx/sqlclient/RowSet.java @@ -18,6 +18,10 @@ package io.vertx.sqlclient; import io.vertx.codegen.annotations.VertxGen; +import io.vertx.codegen.annotations.GenIgnore; + +import java.util.stream.Stream; +import java.util.stream.StreamSupport; /** * The execution result of the row set of a query provided as {@code }, commonly used as a {@code RowSet}. @@ -32,4 +36,11 @@ public interface RowSet extends Iterable, SqlResult> { @Override RowSet next(); + /** + * @return a stream of rows + */ + @GenIgnore(GenIgnore.PERMITTED_TYPE) + default Stream stream() { + return StreamSupport.stream(spliterator(), false); + } }