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

Aaron Trevena aaron.trevena at gmail.com
Mon Feb 19 10:28:39 GMT 2007

Hi Schwern,

> The important change is that CDBI hands the iterator the statement handle and not a > list.  That's about all I need.  Unfortunately it will probably break people's existing
> custom iterators.  I haven't gotten a clear answer back from Tony on if that's allowed,
> but the Iterator interface is pretty undocumented.  Does anyone write custom iterators
> and if so how custom are they?  I can preserve most well-behaved subclasses.

I have a wrapper iterator that mostly uses the API, unfortunately it's
very naughty and peeks into the data structure to allow you to filter,
this would of course break if there wasn't any data in the result set
to peek at.

I'd like to be able to keep it working as it's rather cool IMHO - I'm
using it to append the results of a query for each leg of a journey
into a single iterator with the same API as the cdbi one, it also
allows me to skip duplicates, and even apply rules to filter results


LAMP System Integration, Development and Hosting

More information about the ClassDBI mailing list