de.fuberlin.wiwiss.d2rq.sql
Class SQLIterator
java.lang.Object
de.fuberlin.wiwiss.d2rq.sql.SQLIterator
- All Implemented Interfaces:
- com.hp.hpl.jena.util.iterator.ClosableIterator<ResultRow>, Iterator<ResultRow>
public class SQLIterator
- extends Object
- implements com.hp.hpl.jena.util.iterator.ClosableIterator<ResultRow>
Executes an SQL query and delivers result rows as an iterator over ResultRow
s.
The query is executed lazily. This class logs all executed SQL queries.
- Author:
- Chris Bizer chris@bizer.de, Richard Cyganiak (richard@cyganiak.de)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLIterator
public SQLIterator(String sql,
List<ProjectionSpec> columns,
ConnectedDB db)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<ResultRow>
next
public ResultRow next()
- Specified by:
next
in interface Iterator<ResultRow>
- Returns:
- The next query ResultRow.
nextRow
public ResultRow nextRow()
- Deprecated. Use
next()
instead
close
public void close()
- Make sure the SQL result set is closed and freed. Will auto-close when the
record-set is exhausted.
- Specified by:
close
in interface com.hp.hpl.jena.util.iterator.ClosableIterator<ResultRow>
cancel
public void cancel()
remove
public void remove()
- Specified by:
remove
in interface Iterator<ResultRow>