[Dbix-class] How does limit work?

Dan Horne dan.horne at redbone.co.nz
Fri Aug 11 06:25:49 CEST 2006


Hi 

The first example in the cookbook (Paged Results) shows how to do this

http://search.cpan.org/~mstrout/DBIx-Class-0.07000/lib/DBIx/Class/Manual/Coo
kbook.pod

Dan 

> -----Original Message-----
> From: dbix-class-bounces at lists.rawmode.org 
> [mailto:dbix-class-bounces at lists.rawmode.org] On Behalf Of 
> George Hartzell
> Sent: Friday, 11 August 2006 4:12 p.m.
> To: dbix-class at lists.rawmode.org
> Subject: [Dbix-class] How does limit work?
> 
> 
> When I'm playing with queries to see if they do what I want, 
> I frequently just tack a 'limit 10'; onto the end so that I 
> don't have to wait for the full query to run.
> 
> I've seen the reference to SQL::Abstract::Limit and setting 
> the limit dialect.  I've also skimmed through 
> Class/Storage/DBI.pm but it's not clear where it comes into 
> play there.
> 
> I've tried adding {limit => 10} to the ->search(), but it 
> didn't seem to just automagically work.
> 
> Is there a way to limit the query as I run it?
> 
> Thanks,
> 
> g.
> 
> 
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive: 
> http://www.mail-archive.com/dbix-class@lists.rawmode.org/
> 




More information about the Dbix-class mailing list