title: Java: Writing SQL Statements
body: <p>I'm writing a one-time Java program to add a bunch of rows in a CSV file to a MySQL database. Are there any Java classes/toolkits to help with this? Something that will escape necessary characters, etc? (eg prepared statements)</p>
  
  <p>Or should I just write the statements myself, like this:</p>
  
  <pre><code>result += String.format(
     "INSERT INTO node (type, language, title) VALUES (%s, %s, %s)", 
      node.get("type"), node.get("language"), node.get("title")
  );
  </code></pre>