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

Matt S Trout dbix-class at trout.me.uk
Mon Jun 8 19:37:50 GMT 2009


On Sun, Jun 07, 2009 at 09:09:28PM -0400, Rob Kinyon wrote:
> 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.

Don't we basically materialize it during cursor construction?

I mean, $rs->all doesn't use a cursor.

So why should as_query need to? Can't it share the same logic?

-- 
        Matt S Trout         Catalyst and DBIx::Class consultancy with a clue
     Technical Director      and a commit bit: http://shadowcat.co.uk/catalyst/
 Shadowcat Systems Limited
  mst (@) shadowcat.co.uk        http://shadowcat.co.uk/blog/matt-s-trout/



More information about the DBIx-Class mailing list