title: Groovy withBatch without need for closure
body: <p>I am making use of withBatch API as:</p>
  
  <pre><code>int[] modifyCount = sql.withBatch(batchSize, updateQuery) { ps -&gt;
          keyValue.each { k,v -&gt;
              ps.addBatch(keyvalue:k, newvalue:v)
          }
      }
  </code></pre>
  
  <p>In closure, I set values for the placeholders in the updateQuery. It works fine.</p>
  
  <p>Suppose updateQuery has already all the fields defined and hence code inside closure above is not actually needed now.</p>
  
  <p>What change is needed for that?</p>