title: How to use named parameter in plain sql with jooq
body: <p>I'm using JOOQ with plain/raw SQL, so that means i'm not using any code generation or the fluid DSL thingy. </p>
  
  <p>The following code works: </p>
  
  <pre class="lang-java prettyprint-override"><code>Connection connection = ...;
  DSLContext context = DSL.using(connection, ...);
  String sql = "select * from mytable t where (t.id = ?)"; 
  String id = ...; //
  Result&lt;Record&gt; result = context.fetch(sql, id);
  </code></pre>
  
  <p>Now let's say i have a query with multiple parameters like this: </p>
  
  <pre class="lang-java prettyprint-override"><code>String sql = "select * from mytable t where (t.id = ?) " + 
               "and (t.is_active = ?) and (t.total &gt; ?)"; 
  </code></pre>
  
  <p>How do i use a named parameter with these types of queries? 
  I'm thinking something like : </p>
  
  <pre class="lang-java prettyprint-override"><code>String sql = "select * from mytable t where (t.id = :id) " + 
               "and (t.is_active = :is_active) and (t.total &gt; :total)"; 
  
  ResultQuery&lt;Record&gt; rq = context.resultQuery(sql);
  rq.getParam("id").setValue(...); 
  rq.getParam("is_active").setValue(...);
  rq.getParam("total").setValue(...);
  Result&lt;Record&gt; result = rq.fetch();
  </code></pre>
  
  <p>But the above code doesn't work (for obvious reasons). Thanks in advance. </p>