Hi All, 

For a specific case, I want to use jooq as a sql executor to fetch plain 
text queries(selectable). Lukas has explained a workaround in this 
stackoverflow 
<https://stackoverflow.com/questions/57588198/how-to-generate-sql-from-template-and-param-placeholder-with-jooq>
 but 
I'm not sure it's actually binding the param by name (AS IS) rather than 
placing param values according to the binding order @index. (changing the 
param name wont effect, query works).

See below sample query. 

*Select **
*From mySP(:Val, :Name, 0, 9999) d *
*Left Join Samples s on (s.id_sample = d.id_sample)*
*Where s.ref=:Extref and s.val = :Val*
      
Assume the user has requested above selectable sql and send the parameter 
values separately. So I need to execute this via jooq with binding each 
params by its name at the prepare. These are the steps. 

   1. assign the query to jooq. 
   2. prepare it. get/fetch the params list. (in this case :Val, :Name, 
   :ExtRef)
   3. bind each param by name (note *:Val *is used in 2 places, so single 
   binding by name should be enough). 

Could anybody kindly show me how to achieve this with JOOQ. 
*(Java Spring SOAP API, JOOQ: 3.11.0 on Firebird 3)* 

Thank You. 

Regards, 
Buddhika E.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/d98a4a42-8379-45e6-9ddf-5f51e9a8a821n%40googlegroups.com.

Reply via email to