[Dbix-class] How to build a "good" object with deep nested
prefetched rows from raw data?
Peter Rabbitson
rabbit+dbic at rabbit.us
Thu May 2 11:01:53 GMT 2013
On Thu, May 02, 2013 at 08:57:30PM +1000, Peter Rabbitson wrote:
>
> *) Allow {cursor} to be set (either via cursor() or make a separate setter)
> *) Make it accept a coderef
> *) Teach all()/next()/single() to pre-populate {_stashed_rows}
> *) Make _construct_results() aware of this somehow (handwave)
> *) Profit
>
In case this part is unclear - I am not saying the internals above
(apart from the official API) are stable and will remain in the
codebase. This is just a suggestion how to experiment *today* so a
proper API supported by tests can be devised later.
In other words if you just take my advice, implement something in house
and never talk to us again - we *will* eventually break your code ;)
Cheers
More information about the DBIx-Class
mailing list