Are there any node.js MySQL drivers that support LOAD DATA INFILE (http://dev.mysql.com/doc/refman/5.0/en/load-data.html)? I have some utilities that rely heavily on bulk insertion, and can't find any node.js drivers that explicitly mention supporting it.
Asked
Active
Viewed 3,688 times
2 Answers
1
Just verified that it works:
conn.query('LOAD DATA LOCAL INFILE ? INTO TABLE my_table (col1, col2)',
[pathToFile],
function(err) {
//done
});

Evan Siroky
- 9,040
- 6
- 54
- 73
-
It works for me as above using the NPM mysql library - not the mysql2 (bummer). – RobMac May 18 '23 at 20:24