title: groovy insert statement Can't infer the SQL type to use for an instance of org.codehaus.groovy.runtime.GStringImpl
body: <p>error message: </p>
  
  <pre><code>URI
  /racetrack/readUserRole/index
  Class
  org.postgresql.util.PSQLException
  Message
  Can't infer the SQL type to use for an instance of org.codehaus.groovy.runtime.GStringImpl. Use setObject() with an explicit Types value to specify the type to use
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>a="col01"
  b="col${usercol}"
  c="col${rolecol}"
  sql.eachRow("select $a,$b,$c from read_csv where col01=? and col${usercol}!=? ", [file.name,""]) {
  
      t="${it."$a"}"
      i="${it."$b"}"
      r="${it."$c"}"
      t.getClass() == String
      i.getClass()== String
      r.getClass()== String
  
      def list2=[t,i,r]
      println list2
      sql.execute('insert into read_user_role(version,roledata,textname,userdata)'+
              'VALUES (0,?,?,?)', list2)
  }
  </code></pre>
  
  <p>the problem occurred at insert statement as error message, so how i suppose to fix this sql type issue?</p>