*/
@Override
protected void flushBacklogInternal() throws SQLException {
try {
// load node backlog
Statement statement = (com.mysql.jdbc.Statement)connection.getJDBCConnection().createStatement();
statement.setLocalInfileInputStream(MySQLLoadUtil.flushNodes(nodeBacklog));
statement.execute(
"LOAD DATA LOCAL INFILE 'nodes.csv' " +
"INTO TABLE nodes " +
"COLUMNS TERMINATED BY ',' " +
"OPTIONALLY ENCLOSED BY '\"' " +
"ESCAPED BY '\"' " +
"LINES TERMINATED BY '\\r\\n' " +
"(id,ntype,svalue,dvalue,ivalue,tvalue,bvalue,ltype,lang,createdAt)");
statement.setLocalInfileInputStream(MySQLLoadUtil.flushTriples(tripleBacklog));
statement.execute(
"LOAD DATA LOCAL INFILE 'triples.csv' " +
"INTO TABLE triples " +
"COLUMNS TERMINATED BY ',' " +
"OPTIONALLY ENCLOSED BY '\"' " +
"ESCAPED BY '\"' " +
"LINES TERMINATED BY '\\r\\n' " +
"(id,subject,predicate,object,context,creator,inferred,deleted,createdAt,deletedAt)");
statement.close();
} catch (IOException ex) {
throw new SQLException("error while flushing out data",ex);
}
}