On Tue, 16 Dec 2008 11:31:33 +1100, Toby Corkindale
<[email protected]> wrote:
> Adam Witney wrote:
>>>>
>>>> I am new to DBIx::Class, but have so far been impressed with how easy 
>>>> it is to use, so thanks to those that have developed and continue to 
>>>> develop it.
>>>>
>>>> I wanted to know, is there a way of adding a method to a class that 
>>>> performs a separate database lookup. I have used the Cookbook example 
>>>> for "Arbitrary SQL through a custom ResultSource", but this returns a 
>>>> query that is plugged into a sub-select. Can i access the database 
>>>> connection handle at all (eg $dbh) to build my own SQL query?
>>>>
>>>> thanks for any help
>>>>
>>>> adam
>>>>

You can skip object creation using a custom resultset.
Have a look at
http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Skip_object_creation_for_faster_results
and the section below for even more speed.

mo

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to