Am Mittwoch 21 März 2007 11:39 schrieb Stephan Austermühle:
> Hi,
>
> I want to place some database queries in App/lib/App/Modell/App.pm. How
> can I access the DBI database handle in that module? Is that the right
> place for complex queries?

Are you sure that your structure is right?
Mine is (based on the Tutorial) App/lib/AppDB/Modell/Table.pm

>
> The database tables are being loaded dynamically by
> Catalyst::Model::DBIC::Schema/ DBIx::Class::Schema::Loader. I read that I
> can get the DBH via $schema->storage->dbh -- but where do I get $schema
> from?

In the table class I can create custom functions to alter or get the 
resultsets.

How complex can a query be that you want the DBI handle? 
With DBIC you can do almost everything, e.g. multi table joins, creating 
aliases with user defined functions and procedures. 
At least for me that's all I want :)

Greets,
Mario Minati

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to