[Dbix-class] how to add a method that performs a database lookup?
Ash Berlin
ash_cpan at firemirror.com
Mon Dec 15 14:42:05 GMT 2008
On 15 Dec 2008, at 12:13, Adam Witney wrote:
>
> Hi,
>
> 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, but before I tell you how I'm going to ask what kind of query
you want. Give us SQL and we'll tell you if you can do it without
going via the raw DBH.
-ash
More information about the DBIx-Class
mailing list