felixge/node-mysql — pull request #230 by demian85 (2012-06-20 19:26:10+00:00)
Title: Enable formatting nested arrays for bulk inserts

I think this might be useful. Actually I need it right now...
I know its sintactic sugar, but it requires just a few extra lines of code.
You can do bulk inserts easily:

var mysql = require('node-mysql');
var conn = mysql.createConnection({
...
});

var sql = "INSERT INTO Test (name, email, n) VALUES ?";
var values = [
['demian', 'demian@gmail.com', 1],
['john', 'john@gmail.com', 2],
['mark', 'mark@gmail.com', 3],
['pete', 'pete@gmail.com', 4]
];
conn.query(sql, [values], function(err) {
if (err) throw err;
conn.end();
});