Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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.

Comment on Re^3: Tie'ing a dbh result set?
Download Code

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 chilling in the Monastery: (6)
As of 2015-11-29 11:23 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls