Package io.github.connellite.jdbc
Class ResultSetStream
java.lang.Object
io.github.connellite.jdbc.ResultSetStream
Builds a sequential
Stream over ResultSetIterator rows. Close the stream (e.g. try-with-resources) to close JDBC resources.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ResultSetStream
public ResultSetStream()
-
-
Method Details
-
stream
public static Stream<Map<String,Object>> stream(Connection connection, String sql, Object... params) throws SQLException - Parameters:
connection- connection closed when the stream is closedsql- query executed once; forward-only read-only cursor- Throws:
SQLException
-
stream
- Parameters:
nps- bound named prepared statement; stream close closes statement and result set- Throws:
SQLException
-
stream
- Parameters:
resultSet- open result set; stream close closes this result set- Throws:
SQLException
-