I had reviewed this thread which covers performing a bulk insert using the mysql node module but with a very particular syntax that doesn't include the use of subqueries. I was wondering how I would perform a bulk insert using this module for a query like this.
db.query('insert into pizzas (qty, timeDayCityId) values (?, (select id from timeDayCity where time_id = ? and day_id = ? and city_id = ?)', [qty, time_id, day_id, city_id])
While I'm able to run this in the mysql module just fine over a loop, I was hoping for a speedier insert process, but can't seem to figure out how to adjust the syntax so it works for a bulk insert operation. Cheers.