Skip to content
Permalink
Browse files
document copy out not closing output stream (#1721)
* document copyout not closing output stream
  • Loading branch information
davecramer committed Feb 27, 2020
1 parent f554118 commit 0faf9ce23a6c5f323545e374f0781b9c1d3cedcd
Showing 1 changed file with 4 additions and 1 deletion.
@@ -78,7 +78,8 @@ public CopyDual copyDual(String sql) throws SQLException {
* Pass results of a COPY TO STDOUT query from database into a Writer.
*
* @param sql COPY TO STDOUT statement
* @param to the stream to write the results to (row by row)
* @param to the Writer to write the results to (row by row).
* The Writer is not closed at the end of the Copy Out operation.
* @return number of rows updated for server 8.2 or newer; -1 for older
* @throws SQLException on database usage errors
* @throws IOException upon writer or database connection failure
@@ -114,6 +115,8 @@ public long copyOut(final String sql, Writer to) throws SQLException, IOExceptio
*
* @param sql COPY TO STDOUT statement
* @param to the stream to write the results to (row by row)
* The stream is not closed at the end of the operation. This is intentional so the
* caller can continue to write to the output stream
* @return number of rows updated for server 8.2 or newer; -1 for older
* @throws SQLException on database usage errors
* @throws IOException upon output stream or database connection failure

0 comments on commit 0faf9ce

Please sign in to comment.