question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I 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:closed
  • Created 5 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
vietjcommented, Jul 25, 2018

@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).

0reactions
vietjcommented, Jul 16, 2021

thanks a lot

On Fri, Jul 16, 2021 at 2:19 AM Yahiaoui Rachid @.***> wrote:

@vietj Done !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found