Trying to modify a passed parameter in Ruby (DBI/Oci8).
The Ruby dbi module is missing a method: bind_param_inout( bind_name, ref_to_var, max_len )
In Perl this method would allow the execution of a PL/SQL block to place the contents of the bind variable into the variable referenced in the second parameter.
I take this as an opportunity to roll my own method using the Oci8 function to provide the result returned by the statement handle, but it seems I cannot emulate the syntax of the DBI method. That is to say I cannot get Ruby to put the data returned from Oci8 into the passed method argument, because it copies it first.
Any way I can work around this while still using Ruby idioms? I have fantasies of patching Ruby DBI to include that (very convenient) method.
Posted Mar 24, 2012, 9:05 PM UTC · edited