[
https://issues.apache.org/jira/browse/JENA-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206137#comment-17206137
]
Martynas Jusevičius commented on JENA-1956:
-------------------------------------------
There's also {{ResultSetRewindable}} which would fulfill the requirement to
reiterate?
> ResultSet should implement Iterable
> -----------------------------------
>
> Key: JENA-1956
> URL: https://issues.apache.org/jira/browse/JENA-1956
> Project: Apache Jena
> Issue Type: Improvement
> Reporter: Jan Martin Keil
> Priority: Major
>
> The class {{ResultSet}} should implement {{Iterable<QuerySolution>}}. That
> would significantly ease query result processing. It would allow to write
> {code:java}
> for (QuerySolution result : QueryExecutionFactory.create(query,
> model).execSelect()) {
> …
> }
> {code}
> instead of
> {code:java}
> ResultSet results = QueryExecutionFactory.create(query, model).execSelect();
> while (results.hasNext()) {
> QuerySolution result = results.next();
> …
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)