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,367
  • 4
  • 32
  • 35
jhurliman
  • 1,790
  • 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
  • 9,040
  • 6
  • 54
  • 73
1

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

davidethell
  • 11,708
  • 6
  • 43
  • 63