We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1525ba1 commit ed8c1e7Copy full SHA for ed8c1e7
vertx-pg-client/src/main/java/examples/SqlClientExamples.java
@@ -328,8 +328,12 @@ public void usingCursors03(SqlConnection connection) {
328
System.out.println("Error: " + err.getMessage());
329
});
330
stream.endHandler(v -> {
331
- tx.commit();
332
- System.out.println("End of stream");
+ // Close the stream to release the resources in the database
+ stream.close(closed -> {
333
+ tx.commit(committed -> {
334
+ System.out.println("End of stream");
335
+ });
336
337
338
stream.handler(row -> {
339
System.out.println("User: " + row.getString("last_name"));
0 commit comments