title: How to use jOOQ converter when using jOOQ to generate SQL without Code-genreation?
body: <p>I am using jOOQ to generate mySql queries without generating code and without using jooq to query database. </p>
  
  <p>While I create query like this : </p>
  
  <pre><code>String tableName = "sample_table";        
  DSLContext create = DSL.using(SQLDialect.MYSQL);
  Table&lt;Record&gt; table = DSL.tableByName(tableName);
  String sql1 = create.insertInto(table, Arrays.asList(
              DSL.fieldByName("id"),
              DSL.fieldByName("roll_no"),
              DSL.fieldByName("name"),
              DSL.fieldByName("date_enrolled"),
              DSL.fieldByName("sex")
              ))
      .values(
              "1",
              12,
              "Raman",
              new DateTime(),
              Sex.Male
             )
      .getSQL(ParamType.INLINED);
  </code></pre>
  
  <p>The generated query looks like : </p>
  
  <pre><code>insert into `sample_table` (`id`, `roll_no`, `name`, `date_enrolled`, `sex`) values ('1', 12, 'Raman', '2016-04-03T03:55:37.940+05:30', 'Male')
  </code></pre>
  
  <p>The datetime value generated here is not accepted by MySQL. I explored and found <a href="http://www.jooq.org/javadoc/3.2.1/org/jooq/Converter.html" rel="nofollow">jOOQ converter</a> can be used for custom conversions. I could find examples on <a href="http://www.jooq.org/doc/2.6/manual/sql-execution/fetching/data-type-conversion/" rel="nofollow">how to use conversion while fetching data</a>, but unable to figure out on how to use convertor while querying. How can I use jOOQ Convertor to generate SQL without Code-generation ? Or if there is any better way to generate this query right for sql.</p>