You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2021/09/24 17:55:00 UTC

[jira] [Closed] (JENA-1956) ResultSet should implement Iterable

     [ https://issues.apache.org/jira/browse/JENA-1956?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-1956.
-------------------------------

> 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)