[#3638] Let ResultQuery<R> extend Iterable<R>
This commit is contained in:
parent
63d761a16d
commit
31477324dc
@ -45,6 +45,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@ -127,6 +128,16 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
|
||||
*/
|
||||
ResultSet fetchResultSet() throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Execute the query and "lazily" return the generated result.
|
||||
* <p>
|
||||
* This is essentially the same as {@link #fetchLazy()}, except that being
|
||||
* declared in {@link Iterable}, this method can be used in Java 5 foreach
|
||||
* statements. {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
Iterator<R> iterator() throws DataAccessException;
|
||||
|
||||
/**
|
||||
* Execute the query and "lazily" return the generated result.
|
||||
* <p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user