[Dbix-class] as_query() and DBIx::Class::Cursor::Cached aren't friends

Rob Kinyon rob.kinyon at gmail.com
Mon Jun 8 01:09:28 GMT 2009


On Sun, Jun 7, 2009 at 20:36, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> The fix should be quite simple, i.e. move as_query out of the Cursor
> class. But first I'd like someone to comment on why it ended up there
> in the first place.

The only thing that has a query is the cursor. Everything else has the
building blocks of a query, but hasn't been materialized as such. A
ResultSet (which is where I originally thought to put it) can
materialize as all sorts of queries, so it can't live there.

The correct fix is to have Cursor::Cached implement as_query as a
delegation to Cursor. I haven't the foggiest what that would entail.

-- 
Thanks,
Rob Kinyon



More information about the DBIx-Class mailing list