Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^3: Tie'ing a dbh result set?

by thargas (Deacon)
on Jul 26, 2011 at 15:03 UTC ( #916789=note: print w/replies, xml ) Need Help??

in reply to Re^2: Tie'ing a dbh result set?
in thread Tie'ing a dbh result set?

If you can guarantee that the array will only be accessed:

  • in order
  • read only
  • only once per element
  • you know how many elements there are
then you can do it by simply writing a FETCH which returns the next resultset and a FETCHSIZE which returns the correct size. It would work correctly for usage like:
foreach my $result_ref (@array) { process($result_ref); }

Otherwise, please explain how you make it function as an iterator.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://916789]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2016-10-24 11:04 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (305 votes). Check out past polls.