denodrivers/mysql

For calling stored procedure, why does client.query() and client.execute() only return result of first query? (unlike nodejs mysql2 which gives result of all queries)

LalitSinghRana opened this issue · 1 comments

I wrote a very simple app in both node and deno. I'm calling same store procedure in both (which is just 2 select statement returning 2 rows each).

node mysql2 client.query() gives array containing 2 array result. But deno mysql client.query() and client.execute() both only give result for first select statement.

Any idea why this is happening?

Unfortunately, the Deno MySQL module does not have built-in support for handling multiple result sets from stored procedures. To work around this limitation, you can split your stored procedure into multiple procedures, each returning a single result set, and then call each of them sequentially in your code.