title: How do I do a batch insert in jOOQ with raw SQL?
body: <p>I need to do a batch insert with a dynamically constructed SQL.</p>
  
  <p>Examples in the documentation that I found all use jOOQ-generated table wrapper classes, which I don't have here, and I would prefer not to have to figure out and specify column names (the insert uses all columns in the table's defined order).</p>
  
  <p>How do I do that?</p>
  
  <p>I've tried the following, but it does not work (bind variables all end up as NULL).</p>
  
  <pre><code>import org.h2.Driver;
  import org.jooq.DSLContext;
  import org.jooq.impl.DSL;
  import org.junit.Test;
  
  public class BatchBindTest {
  
      @Test
      public void test() throws SQLException {
          Connection conn = new Driver().connect("jdbc:h2:./batchBindTest", null);
          DSLContext x = DSL.using(conn);
          x.execute("create table test(id integer not null)");
  
  
          // this does not work, value is not bound
          x.batch("insert into test values(?)").bind(1).execute();
  
      }
  
  }
  </code></pre>