Я не могу использовать объемную вставку в моей БД с помощью node.js lib mysljs.Как объединить вставки в mySql и node.js с помощью mysljs
Я последовал ответ от:
How do I do a bulk insert in mySQL using node.js
без успеха.
var sql = "INSERT INTO resources (resource_container_id, name, title, extension, mime_type, size) VALUES ?";
var values = [
[1, 'pic1', 'title1', '.png', 'image/png', 500],
[1, 'pic2', 'title2', '.png', 'image/png', 700]];
return connection.query(sql, [values], (result) => {
if (err) throw err;
connection.end();
});
я получаю сообщение об ошибке:
'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \'?\' at line 1'
Я также попытался promisify запроса mehod использования Блюбердо, но без успеха, я снова получить ту же ошибку.