Re: [Catalyst] getting database handles and run arbitrary SQL

2008-09-27 Thread Matt S Trout
On Wed, Sep 24, 2008 at 12:15:08AM -0700, theshz wrote: Hi, I'm new to Catalyst, just went through the Tutorial, everything worked fine. But for my reporting application (part of a bigger application where CRUD will be more often), I need to run some complicated querries. I did find the

[Catalyst] getting database handles and run arbitrary SQL

2008-09-24 Thread theshz
Hi, I'm new to Catalyst, just went through the Tutorial, everything worked fine. But for my reporting application (part of a bigger application where CRUD will be more often), I need to run some complicated querries. I did find the Arbitray SQL article in DBIx's FAQ, but I don't even know how

Re: [Catalyst] getting database handles and run arbitrary SQL

2008-09-24 Thread Johannes Plunien
Hi, On 24.09.2008, at 09:15, theshz wrote: Is it possible to get the database handle and run SQL directly as in DBI? yes, try: my $dbh = $c-model('DBIC::User')-result_source-storage-dbh; (assuming your model based on Catalyst::Model::DBIC::Schema is named DBIC and you got a schema