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
if I run an "UPDATE ..." query and I run it using the .queryStream method and I try to iterate the returned rows, the iterator doesn't return the result.
I'm using the for await (const elm of conn.queryStream()) { ... } syntax for this. Apparently, the code never enters the cycle and the execution goes ahead, meaning that the AsyncGenerator's Promise is indeed resolved as the query's execution ends.
While it does if the query is a DDL. I'm using .queryStream() over a connection borrowed from the connection pool, as the documentation suggests.
Instead, when I was using mysql2 in the past, I could get the same output that I can get using the mysql cli. Something like this:
There is indeed a difference in behavior compared to mysql2.
Just a question: why using streaming on a command that will have only one result ? streaming is to avoid loading lots of data into memory for big query.
anyway, I'll add that for compatibility.
Hi all,
if I run an "UPDATE ..." query and I run it using the .queryStream method and I try to iterate the returned rows, the iterator doesn't return the result.
I'm using the
for await (const elm of conn.queryStream()) { ... }
syntax for this. Apparently, the code never enters the cycle and the execution goes ahead, meaning that the AsyncGenerator's Promise is indeed resolved as the query's execution ends.While it does if the query is a DDL. I'm using .queryStream() over a connection borrowed from the connection pool, as the documentation suggests.
Instead, when I was using mysql2 in the past, I could get the same output that I can get using the mysql cli. Something like this:
Can you help me to obtain the same behaviour on this connector?
Thank you
The text was updated successfully, but these errors were encountered: