RE: dynamically defining base class for a CDBI table module

[prev] [thread] [next] [Date index for 2005/03/10]

From: Perrin Harkins
Subject: RE: dynamically defining base class for a CDBI table module
Date: 20:26 on 10 Mar 2005
On Thu, 2005-03-10 at 15:18 -0500, Gianni, Andrew wrote:
> For now, I just want to make sure I'm sharing the database handle within
> the application, which (I think) is usually done through the db_Main
> method in the base class. Each transaction of the web application can be
> expected to make multiple calls to a number of tables across a number of
> schemas.

Rather than change the base classes to connect to different databases,
you can override db_Main and have it choose the right connection
dynamically.  I think you'll find examples on the wiki.

> In the meantime, however, can I
> expect to take a significant performance hit by using
> Class::DBI::Factory in a non-mod_perl environment?

I couldn't tell you, since I don't use it.  I think the author is on
this list though.

- Perrin

RE: dynamically defining base class for a CDBI table module
Perrin Harkins 20:26 on 10 Mar 2005

Generated at 08:54 on 14 Mar 2005 by mariachi v0.52