You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the the pg.Cursor API documentation it appears to be using callbacks, is there a reason that there hasn't been a switch to the Promises API introduced in ES6?
Other parts of the package shows the usage of promises. As can be seen here.
The text was updated successfully, but these errors were encountered:
I think it'd be fine to add it directly to the Cursor.read(...) function. It could mirror the query API and check if the second parameter is not defined, and if so, return the result as a Promise. The close function is a bit trickier as right now the callback is not required so changing it to return a Promise (when there's no callback) could lead to a dangling Promise in existing code.
Looking at the the pg.Cursor API documentation it appears to be using callbacks, is there a reason that there hasn't been a switch to the Promises API introduced in ES6?
Other parts of the package shows the usage of promises. As can be seen here.
The text was updated successfully, but these errors were encountered: