Open
Description
Hi,
thank you very much for the mysql2 library! I have a question that if not currently possible could be turned into a feature request. I want to process large streams of data from MySQL. The MySQL CLI client allows to add the -q option for avoiding buffering and PHP for example allows to add the result mode MYSQLI_USE_RESULT
to stream the data. I only found a way to stream data using mysql2, but what I'm looking for is a way to run a query without buffering, optimally like so:
db = await mysql.createConnection({...})
for await (let row of db.query("SELECT * FROM t1")) {...}
Is this already possible or is something in this direction already planned?
Thanks!
Robert