title: How to insert batch of 1000 records into db?
body: <p>I'm reading a huge file and inserting records in mysql using <code>statement.executeBatch()</code> of prepared statement. Below is the code:</p>
  
  <pre><code>for(int i = 0; i &lt; file.length; i++) {
  
        count += 1
        statement.setString(1, record.id)
        statement.setString(2, record.date)
        statement.setString(3, record.msg)
        statement.addBatch()
  
        if (count % 1000 == 0) 
            statement.executeBatch()
  }
  statement.executeBatch() 
  </code></pre>
  
  <p>How can Slick help here (perhaps mimicking the code above)?</p>