>
> Well, you can always run "plain SQL" through jOOQ. It would be 
> something like a more advanced Apache Commons DbUtils: 
> http://commons.apache.org/dbutils/ 
>
> I mean, you could still do things like: 
> Result<Record> result = create.fetch("SELECT ?, ? FROM DUAL", 1, 2); 
> for (POJO pojo : result.into(POJO.class)) { 
>   // ... 
> } 
>
This is exactly what i meant. For this particular type of use, how do you 
actually create the factory and which dialect to use? 

... then again, if the actual bind value string length is included in 
> cast expressions, this would lead to repeated hard-parses for 
> otherwise identical SQL strings, just because of different bind 
> values. Performance-wise, this can be quite bad. Maybe I should think 
> a bit more about alternatives...  

Please CMIIW, but i thought we only need this when we're doing stuff like 
"SELECT ?, ? from DUAL". 
Are you saying that we need this too for "normal" binding like "SELECT * 
from myTable where id = ?" ?  
Because in the second case, the sql will render to something like "SELECT * 
from myTable where id = cast('ABCDE' as varchar(5))" instead of just 
"SELECT * from myTable where id = ?". 

Thanks.
ts.

Reply via email to