[#4687] Add ResultQuery.fetchStream() as a alias for stream()
This commit is contained in:
parent
cc24843cdb
commit
bfe3034187
@ -146,6 +146,17 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
|
||||
Iterator<R> iterator() throws DataAccessException;
|
||||
|
||||
/* [java-8] */
|
||||
/**
|
||||
* Stream this query.
|
||||
* <p>
|
||||
* This is just a synonym for {@link #stream()}.
|
||||
*
|
||||
* @return The result.
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @see #stream()
|
||||
*/
|
||||
Stream<R> fetchStream() throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Stream this query.
|
||||
* <p>
|
||||
|
||||
@ -48,8 +48,8 @@ import static java.util.concurrent.Executors.newSingleThreadExecutor;
|
||||
import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
// ...
|
||||
import static org.jooq.impl.Utils.DataKey.DATA_LOCK_ROWS_FOR_UPDATE;
|
||||
import static org.jooq.impl.Utils.consumeResultSets;
|
||||
import static org.jooq.impl.Utils.DataKey.DATA_LOCK_ROWS_FOR_UPDATE;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.sql.ResultSet;
|
||||
@ -79,7 +79,6 @@ import org.jooq.Result;
|
||||
import org.jooq.ResultQuery;
|
||||
import org.jooq.Results;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.exception.DataAccessException;
|
||||
import org.jooq.tools.Convert;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
|
||||
@ -318,7 +317,12 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
|
||||
|
||||
/* [java-8] */
|
||||
@Override
|
||||
public final Stream<R> stream() throws DataAccessException {
|
||||
public final Stream<R> fetchStream() {
|
||||
return fetchLazy().stream();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Stream<R> stream() {
|
||||
return fetchLazy().stream();
|
||||
}
|
||||
/* [/java-8] */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user