I mean this Node.js SQLite each.
Wonder if it is possible to use async iterator and call,
for await (const r of SQL_STATEMENT) {
}
Or perhaps some other conveniences, like subscribe or observable?
I mean this Node.js SQLite each.
Wonder if it is possible to use async iterator and call,
for await (const r of SQL_STATEMENT) {
}
Or perhaps some other conveniences, like subscribe or observable?
For further actions, you may consider blocking this person and/or reporting abuse
Classic DEV Post from 2020:
As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! π₯³
Happy coding!
Kamran Ahmad -
Francisco Mendes -
Rahul Bagal -
Ahmed Bhesaniya -
Once suspended, patarapolw will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, patarapolw will be able to comment and publish posts again.
Once unpublished, all posts by patarapolw will become hidden and only accessible to themselves.
If patarapolw is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Pacharapol Withayasakpunt.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community π©βπ»π¨βπ» safe. Here is what you can do to flag patarapolw:
Unflagging patarapolw will restore default visibility to their posts.
Top comments (3)
The meat of
Database#each
is implemented in C++ unfortunately:github.com/mapbox/node-sqlite3/blo...
Essentially the callback is sent over to the C++ side and scheduled over there.
Not sure how the C++ side can pass an async generator back to JavaScript.
This might be of use to you.
How to create an SQLite database in node.js
dev.to/forbeslindesay/how-to-creat...
Maybe atdatabases support async iterator via SQLQuery.querystream; but I am not so sure. Maybe tutorial is missing in this aspect.
The best (and simplest) driver for SQLite in Node.js would still be better-sqlite3.
Still, you have done well wrapping around
pg
(and also with TypeScript typings). I will have to borrow it for PostgreSQL.