mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1823 - ENH: Add query.findStream() and query.findLargeStream()
This commit is contained in:
@@ -71,6 +71,7 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Default implementation of an Object Relational query.
|
||||
@@ -756,7 +757,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
if (underlyingList.size() == 1) {
|
||||
SpiExpression singleExpression = underlyingList.get(0);
|
||||
if (singleExpression instanceof IdInExpression) {
|
||||
return new CacheIdLookup<>((IdInExpression)singleExpression);
|
||||
return new CacheIdLookup<>((IdInExpression) singleExpression);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -1455,7 +1456,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
|
||||
@Override
|
||||
public Query<T> usingTransaction(Transaction transaction) {
|
||||
this.transaction = (SpiTransaction)transaction;
|
||||
this.transaction = (SpiTransaction) transaction;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1521,6 +1522,16 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return server.findIterate(this, transaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<T> findStream() {
|
||||
return server.findStream(this, transaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<T> findLargeStream() {
|
||||
return server.findLargeStream(this, transaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Version<T>> findVersions() {
|
||||
this.temporalMode = TemporalMode.VERSIONS;
|
||||
|
||||
Reference in New Issue
Block a user