Started playing with this some today. Here is what I found for PostgreSQL. Given a function defined to return a refcursor, here is what seems like is needed:
So against postgresql, when a parameter is registered with mode of REF_CURSOR we need to:
Know to append the `? ='
Validate that the REF_CURSOR is registered positionally and that its position is 1
Disallow named parameters since the spec does not allow named/positional mixing and the REF_CURSOR parameter is implicitly positional
Register the JDBC parameter as Types#OTHER
Christian, I did some work on this today and got the basics working on PostgreSQL. I I have not tested out error handling, and I have not tested with Oracle. I will be pushing that work soon, if you wanted to try it out.
I am going to leave this open for now because I want to unify some internal support contracts.
This will be in the Beta5 release I do tomorrow too, hopefully with those unifications.
For my own reference the contracts I would like to unify are:
Steve, all my tests pass now and it looks like we have a very usable set of SP features. I haven't tested REF_CURSOR on Oracle though, only PostgreSQL.
Awesome, thanks for trying it out Christian.