I have two questions about using CGI::Application::Plugin::DBIx::Class for
CRUD operations in a CGI::Application base app.

1. If I have setup the connection with $self->dbic_config({schema =3D>
MyApp::Schema->connect(@connection_data)}) will $app->schema give me the
full DBIx::Class schema instance, or will I get a restricted instance on
which I can only call methods defined in the CAP::DBIx::Class documentation?

2. I am running my CGI::Application subclass under mod_perl. In this case
with the connection be persistent? Or should I use Apache::DBI to ensure
that it is.

If I recall correctly CAP::DBIC just associates the schema to the CA instance, along with some commonly used functions. So you should have access to everything.

I would not use Apache::DBI, because DBIC already manages its own connections, and they probably don't mix well. I believe DBIC makes a connection per-process, and keeps it persistent reconnecting only if the connection died, etc...

_______________________________________________
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