Charmander
Charmander
Is there an error? What do “does not work” and “not well handled” mean?
You should be able to promisify pg-cursor manually: ```js const { promisify } = require('util') const Cursor = require('pg-cursor') Cursor.prototype.readAsync = promisify(Cursor.prototype.read) ⋮ let rows = await cursor.readAsync(100) while (rows.length)...
@zachsa See https://github.com/brianc/node-pg-cursor/blob/1cdad4d8d20000dc6fb9a783394249b727106b84/index.js#L170-L185 and https://github.com/brianc/node-postgres/blob/2c7be86104e6f4e3ad5f2992b80a54e11a8edff3/lib/client.js#L265-L280.
@zachsa pg-cursor has `"pg": "6.x"` in its `devDependencies`, which it uses for testing. It *should* be tested on the latest pg, but it doesn’t cause pg 6.x to be installed...
@tienzochi You can’t make new queries on a client while one is already in progress (the one with the cursor). `pool.query` instead should work. (That example code should be written...
You might want to write a custom pool implementation based on [generic-pool][] (for example). [generic-pool]: https://www.npmjs.com/package/generic-pool
(Formerly brianc/node-postgres#391 – from when the pool was part of pg)
The linter isn’t compatible with Node ≤0.12 anymore. (It would be nice if pg didn’t have to be either…)
> a compelling reason to throw when a developer calls `client.release` more than once It’s a mistake and hiding mistakes is bad. > Related question: Is there an easy way...
This might be fixed by #86.