The only reliable MySQL support I know of is through node-mysql and it specifically says in the documentation:
Warning:
sql
statements 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 IF
s and ELSE
s. 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?