On Tue, Oct 11, 2011 at 11:24 AM, Juerd Waalboer via RT
<bug-DBIx-Simple@rt.cpan.org> wrote:
Show quoted text> DSBD is a very complicated way to fetch N rows at a time, by the way.
> I'd suggest simply doing that manually:
The more I understand DBI and DSBD, the more I see that it doesn't
really work the way it's advertised. DSB gives a decent, standard
interface for iteration over chunks, but I'd probably do something
like your manual example.
Show quoted text> Or do you think DBIx::Simple should have this functionality built-in?
>
> while (@chunk = $result->arrays(100)) { ... }
> while (@chunk = $result->hashes(100)) { ... }
> while (@chunk = $result->objects(100)) { ... }
Maybe. As you said, it's easy enough to do manually. I think it
would be beneficial if the DB is able to operate asynchronously and
start giving back results before the DB query finishes, but that's
very DB-specific and thus maybe not worth adding to DBx::Simple.
fetchall_arrayref with a "max results" option seems like it would be
beneficial in such a case, but the more I dig into it, the less
convinced I am that it works correctly for some common DBs I've tried
it with.
Please feel free to disregard my feature request. :-)
-- David