Stored Procedures that return a result set (not OUT parameters)

479 views
Skip to first unread message

Sean Bright

unread,
Aug 13, 2015, 1:07:39 PM8/13/15
to jDBI
Greetings,

I have been lurking around the list trying to find the answer to what I think is a very simple question but I haven't been able to find a definitive answer:

With jDBI - either with the SQL Object API or using Handle.createCall() directly - can I call a stored procedure that generates a result set and get back a SomeCollection<MyMappedObject>?

If the answer is yes, can someone point me to some example code showing how this is done?

Kind regards,
Sean


Christopher Currie

unread,
Aug 13, 2015, 3:19:48 PM8/13/15
to jd...@googlegroups.com
This may depend on your database, but as far as I know it's possible, you just need to use @SqlQuery or Handle.createQuery() instead. I don't have any specific examples to post, but the Query examples should be enough, just replace the SQL with the appropriate invocation of your stored procedure.

Christopher

--
You received this message because you are subscribed to the Google Groups "jDBI" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jdbi+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages