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
is there a way to fetch results of select statement one by one, instead of all at once, by using javascript generator functions?
(those functions that internally use yield statement)
I am aware that .each() function can handle reading rows one by one by using callbacks,
but callbacks get complicated when used in async/await environment.
I tried converting ".each()" callbacks to promise and to generator function, but so far this didn't work.
So are generator functions already possible (and how), or could they be added to the core library?
Proposed implementation
something like
function*selectEach(query,params=[]) ...
The text was updated successfully, but these errors were encountered:
Summary
is there a way to fetch results of select statement one by one, instead of all at once, by using javascript generator functions?
(those functions that internally use yield statement)
I am aware that .each() function can handle reading rows one by one by using callbacks,
but callbacks get complicated when used in async/await environment.
I tried converting ".each()" callbacks to promise and to generator function, but so far this didn't work.
So are generator functions already possible (and how), or could they be added to the core library?
Proposed implementation
something like
The text was updated successfully, but these errors were encountered: