I'm a JOOQ newbee. In my company i have been tasked with implementing JOOQ
into our Java application while maintaining full backwards compatibility.
That means (as a first step) implementing JOOQ only so it can, as a proxy,
call any of existing 800 MySql stored procedures we have (big chunk of data
processing logic is on DB side so that GUI can only show what it has been
presented with) and return selected db data in form of JSON.
For me it's a great opportunity to learn about JOOQ and so far i have been
successful: i managed to learn most basic stuff like generating classes
according to DB structure, i managed to implement simple things for
returning data of "select" stored procedures and so on. Now, i have a
problem. Parts of my application require batch inserts in sense that
instead of using CallableStatement.addBatch(...) and then
CallableStatement.executeBatch() i have to use JOOQ.
I naively tried this for inserting 2 rows at once:
Insertdataprocedure p = new Insertdataprocedure();
p.setInName("John");
p.setInSurname("Doe");
p.setInName("Someone");
p.setInSurname("Else");
hoping "p" will just append parameters and execute procedure once while
inserting 2 sets of data, but no luck :(
What's the proper way of calling stored procedures in batched manner using
JOOQ?
Sounds like going against the purpose of using JOOQ, but at this moment i
really have to use JOOQ just as a pass-through for calling existing stored
procedures. Moving existing MySql procedures code to JOOQ would take
months, it's scheduled for a later stage.
--
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.