Sounds like a good idea. Patches welcome :)
Tim.
On Tue, Aug 21, 2007 at 12:10:56PM -0400, Sir Woody Hackswell wrote:
> Hello! I was wondering if it would be possible to pass a reference to
> an array or hashes to execute_for_fetch() in DBD::Oracle. Right now,
> a ref to array of arrays is passed. My thought is to enable named
> placeholders. Right now, numeric/sequential placeholders are used.
> With an array of hashes, you could pass in the placeholder names and
> gain huge flexibility. Named placeholders let me perform much more
> complicated or less-redundant INSERTs and SELECTs.
>
> In dbdimp.c, line 1954
>
> for(i = 0; i < param_count; i++) {
> if(!phs[i]) {
> SV **phs_svp;
>
> sprintf(namebuf, ":p%d", i+1);
> ....
> init_bind_for_array_exec(phs[i]);
>
>
> Couldn't this be switched to key/value binding, for AoH, and the
> current behavior be the default for AoA? Obviously, the code would
> need to be changed to also handle hashes, and extra checks thrown in
> ora_st_execute_array() and ora_execute_array(), and
> execute_for_fetch(). Those should be the only three routines that
> would need to be modified.
>
> Questions? Comments? Good idea? Bad? Am I missing something? Thank
> you for your time.
>
> --
> -Sir Woody Hackswell