mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
ENH: Add Query findEach() with batch consumer
This is a variation of findEach() that makes it easy to have a batch consumer processing a large result in batches. For example, process in batches of 50 beans. Note that the last batch consumed/processed will often have less than the batch size.
This commit is contained in:
1 parent
98aee9ca62
commit
2bb5a85bd6
13 files changed
+252
-101
No files matched your search
@@ -675,6 +675,10 @@ public class TDSpiEbeanServer implements SpiEbeanServer {
|
||||
public <T> void findEach(Query<T> query, Consumer<T> consumer, Transaction transaction) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void findEach(Query<T> query, int batch, Consumer<List<T>> consumer, Transaction t) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> void findEachWhile(Query<T> query, Predicate<T> consumer, Transaction transaction) {
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user