4

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.

Marat Salikhov
  • 6,137
  • 4
  • 30
  • 34
jhurliman
  • 1,595
  • 1
  • 18
  • 20

2 Answers2

1

Just verified that it works:

conn.query('LOAD DATA LOCAL INFILE ? INTO TABLE my_table (col1, col2)', 
  [pathToFile], 
  function(err) {
    //done
  });
Evan Siroky
  • 8,312
  • 6
  • 51
  • 71
1

This post suggests that the felixge driver supports LOAD DATA INFILE.

davidethell
  • 11,398
  • 5
  • 40
  • 60