Search code examples
javamysqlormload-data-infileormlite

Using MySQL LOAD DATA INFILE statement with ormlite


Has anybody tried using load data infile MySQL statement with ormlite? I've looked up the ormlite reference guide but did not find any example on this. I'm a newbie, so please help out.


Solution

  • I would think that the ORMLite Dao.executeRaw() method would work with this statement -- or any similar. Here are the javadocs for that routine. Something like:

    int numRowsChanged =
       dao.executeRaw("load data infile '" + infile.getPath() + "'");