Cursor Issue
See original GitHub issueI have been trying out this driver and it has been working well with vertx and I can retrieve all results well. I do have memory issues so I tried the streaming option which only loaded the first results and no others. So I have moved one step back to the cursors and I am getting the same problem. With the following I only receive the first values. The while loop runs once where it should run multiple times and even on the first iteration within there are no results.
PgPool pool = PgClient.pool(vertx.getDelegate(), options);
pool.getConnection(ar1 -> {
if (ar1.succeeded()) {
PgConnection connection = ar1.result();
Buffer sql = vertx.fileSystem().readFileBlocking("sql/test.sql");
connection.prepare(sql.toString(), ar2 -> {
if (ar2.succeeded()) {
resultHandler.handle(Future.succeededFuture(new JsonObject().put("started", true)));
PgPreparedQuery pq = ar2.result();
PgCursor cursor = pq.cursor(Tuple.of("test"));
cursor.read(5, ar3 -> {
PgRowSet rows = ar3.result();
JsonArray jsonResults = new JsonArray();
PgIterator iterator = rows.iterator();
while (iterator.hasNext()) {
Row result = iterator.next();
jsonResults.add(result);
}
logger.info(jsonResults);
while (cursor.hasMore()) {
cursor.read(5, ar4 -> {
PgRowSet rows2 = ar4.result();
JsonArray jsonResults2 = new JsonArray();
PgIterator iterator2 = rows2.iterator();
while (iterator2.hasNext()) {
Row result2 = iterator2.next();
jsonResults2.add(result2);
}
logger.info(jsonResults2);
});
}
});
}
else {
resultHandler.handle(ServiceException.fail(CONNECTION_FAILED, ar2.cause().getMessage()));
}
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Laptop Cursor not Working: How to Fix the Cursor Issue ...
1. Update Mouse and Keyboard Drivers: · 2. Update Video Drivers: · 3. Disable Biometric Devices: · 4. Disable Antivirus Software: · 5....
Read more >Mouse Keeps Freezing or Glitching: 10 Ways to Fix It
Cursor freezes can be quite troublesome, especially if you cannot use the keyboard as an alternative. The culprit is often a faulty driver, ......
Read more >8 Ways to Fix a Cursor When It Moves On Its Own in Windows 11
Try these fixes to stop a self-moving cursor on Windows 11. ... One common problem is when their cursor wanders on the screen...
Read more >How to Fix Computer Mouse Cursor Problems | Techwalla
Delayed reactions or no response when keys are pressed and lack of scrolling maneuverability are problems commonly associated with a defective mouse device....
Read more >Mouse Acting Erratically, Jumping, or is Not Moving Properly
If the cursor on your screen moves erratically when you move the mouse, the following steps may help you fix the problem.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@yonigibbs I believe it’s quite solid and production read, if there are issues we fix them as soon as we can and issue fixes (there are people already using it in production).
thanks a lot
On Fri, Jul 16, 2021 at 2:19 AM Yahiaoui Rachid @.***> wrote: