Hi Lukas,

Firstly, JOOQ is very useful, thanks for your work.

Secondly, a quick question. I have tried for a while to find ways to make 
use of parameterised queries with JOOQ.
I understand that once the query is constructed it uses PreparedStatement 
automatically. I can see also some related methods in Factory ( bind() ).
But I failed to find how to execute the same query with different parameter 
values, using JOOQ objects. I understand I can get SQL and proceed 
preparing statement, setting parameter values and executing it outside JOOQ.
It seems to me that in order to do that within JOOQ (e.g. using 
ResultQuery.fetch() ) I would need to create the same e.g. SelectQuery 
instance multiple times.
I suspect apart from the overhead of constructing the same query there will 
be extra roundtrip for preparing the statement, even though it may not 
contain any parameters.
It would be useful to be able to just provide new parameter values and 
execute again, ideally allowing to reuse PreparedStatement instance by 
either automatically caching it or allowing client application to do it.
Is it already implemented and I just haven't found it?

Regards,
Vasily

Reply via email to