ActiveRecord + Oracle stored procs

Guys,

I have googled and googled and cannot find anything on this.

Basically I am using ActiveRecord outside of Rails as part of a test suite. I need to call an Oracle stored procedure, and then use standard Active Record finders to query the database.

Is there anyway I can call a stored procedure within Active Record? I need to be able to pass the procedure parameters and receive parameters out, something like

execute( my_stored_proc(i_input, o_output) );

At the moment I have implemented a solution using the module OCI8, which works just fine, but it means I run my stored proc in DB connection 1, and query in DB connection 2, so I have to commit 1 before 2 can see the results, which means I cannot rollback after each test!

Can you get access to the OCI8 methods from your Active Record connection, or better can I get store proc calls with in and out parameters working with standard Active Record functionality?

After another batch of googling, I have concluded you just cannot do what I want out of the box, but its easily added. I documented what I did at

Basically I had to add a new method to ActiveRecord::ConnectionAdapters::OracleAdapter that directly call the OCI8#exec method and it seems to do what I want.