I have been playing about with scrollable result sets (Cursors)
 in Oracle/OCI and have noticed that there has been some discussion about
it before on the list


You can find the discussion here

http://perl.markmail.org/search/?q=list%3Aorg.perl.dbi-dev+fetch_scroll#query:list%3Aorg.perl.dbi-dev%20fetch_scroll+page:1+mid:xqwmgau3zesiyo7n+state:results

and here

http://perl.markmail.org/search/?q=from%3A%22Tim+Bunce%22+scroll+cursor#query:from%3A%22Tim%20Bunce%22%20scroll%20cursor+page:1+mid:t3xvtu3rcqarszsx+state:results


Reading through these I see that basically each Database has its own
flavour or scrollable results set from a select i.e.

Informix   Scrollable and updateable
MySQL      semi Scrollable
Oracle     Scrollable and read only
SQLServer  Scrollable and read only
           Scrollable and updateable

So my proposal is to stub in

fetch_scroll

in DBI

and let the DBD drivers write their own implementation

This would be the same as "bind_param_inout_array" which is stubbed in but
not implemented in DBI

The proposed sub would be like this

bind_param_inout_array => { U =>[1,2,'[, \%attr]'] }

so there will be an attribute param to pass in any commands/setting that
are needed for the fetch.

The advantage of this is we get something that would be customized for
each DBD implementation of course the disadvantage is we do not have a
pure Perl implementation of his functionality.

Any thoughts,comments or even insults;)  are welcome
cheers
John Scoles


Reply via email to