[Pas-dev] more on generic DB session obj
Status: Beta
Brought to you by:
mortis
From: Justin B. <ju...@le...> - 2002-05-17 19:35:22
|
Poking around the directory some more: - Org::Bgw::Pas::Session::MySQL becomes Org::Bgw::Pas::Session::DB. _factory() method gets re-written to look up the driver from the config file and instantiate the appropriate DB factory driver for the session. - Then we create a new Org::Bgw::Pas::Session::Factory. Stuff that can be moved from Org::Bgw::Pas::Session::MySQL::Factory will be moved into this new class. - The MySQL directory gets moved to a new name Factory. - Org::Bgw::Pas::Session::MySQL::Factory becomes Org::Bgw::Pas::Session::Factory::MySQL. All generic stuff is striped so it's MySQL specific and it's parent becomes Org::Bgw::Pas::Session::Factory. - In the conf file we should add the driver to make it easy for the person to tell the app what DB they want to run for the session. So you'll now have up to 7 session variables for the config file: pas.session.dbname pas.session.driver pas.session.dsn pas.session.hostname pas.session.password pas.session.table pas.session.username Of course, if you specify the dsn, you can skip the dbname & hostname. The driver parameter will be a requirement! Any questions? Does this sound good? Can I take a chain saw to it? I'll at least get this working for MySQL in the near future. Other implementations shouldn't be hard. Justin |