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 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.
- assign the query to jooq.
- prepare it. get/fetch the params list. (in this case :Val, :Name, :ExtRef)
- 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.