Yes, that's me as well because i really got stuck :)
In my current usecase i have code inherited from previous dev :\ Below
please find a pseudo version, will not compile but should give an idea:
Please note: procedure name ("storedProcedureName") and actual list of
parameters are specified from the outside, here i hardcoded them for sake
of simplicity
LinkedList<Object[]> params = { ["John", "Doe"], ["Someone", "Else"], ....
optional number of parameters, sometimes up to 1000 sets... };
String basicQuerry = "{call " + storedProcedureName + "(?, ?)}"; //this
line is actually different, here i simplified because in example above
stored procedure takes 2 input parameters.
cs = connection.prepareCall(basicQuerry);
for (int i = 0; i < params.size(); i++) {
Object[] parameters = params.get(i);
for(int i=1; i<=parameters.length; i++)
cs.setObject(i, parameters[i-1]);
cs.addBatch();
}
cs.executeBatch();
--
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].
For more options, visit https://groups.google.com/d/optout.