Is there any way to simply execute a long MySQL query from node.js?
The only reliable Mysql support I know of is through node-mysql and it specifically says in the documentation:
sqlstatements with multiple queries separated by semicolons are not supported yet.
Which kind of sucks... Because I need to insert or update a large number of rows at a time with some logic involved, and it's easily done with one large MySQL query containing
ELSEs. I can't imagine how I'd simply move all the logic over to the node.js side without an enormous loss of performance and complexity in code. So I'm not ready to give up on the pure SQL solution.
Is there any way for me to execute a large SQL query from node.js relatively easily?
Can you define your logic within a stored procedure and then call that as your single statement instead (passing whatever parameters you need)?