Re: Fetch-on-demand iterators (was Re: [CDBI] Make CDBI go fast)

Michael G Schwern <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Tim Bunce wrote:
>>> One possibility is to move executing the statement handle into the iterator
>>> so it doesn't even execute the query until you've asked for the first
>>> object. This would make it safer to hand around iterator objects.
>>>
>>> I'm using this in a mod_perl environment with no problems yet.
>> Yeah, but you're not using Sybase with mod_perl, and I am, so hence my
>> nervousness.
> 
> I think enabling mysql_use_result would raise the same issue for MySQL,
> so it should be possible for Mr Schwern to check for problems while
> developing.

I've taken this all into account and have made sure the statement handle is finished when the iterator is destroyed.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.