We use MySQL for production and H2 for unit testing. There are several 
stored procedures that return result sets for data consumptions. We would 
like to use jOOQ to help map the procedure calls to actual java code and 
POJOs. 

I have seen information in this group in regards to trying to return result 
sets from stored procs, and they mostly state that you can't do it except 
when using Oracle. Any insight would be helpful on how do do this with the 
use of a simple fetchMany("call myProc(?)"). We would really like to use 
the code generation tool to create concrete java code.

Example MySQL procedure:

DELIMITER $$
DROP PROCEDURE IF EXISTS getUsers; $$
CREATE DEFINER=`company`@`%` PROCEDURE `getUsers`(accountName VARCHAR(255))
BEGIN

SELECT a.id
FROM tblUsers a
JOIN tblAccounts b
ON b.id = a.accountId
WHERE b.name = accountName;

END$$
DELIMITER ;

-- 
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.

Reply via email to