Re: [CDBI] DBI's last_insert_id and Class::DBI's _auto_increment_value

[prev] [thread] [next] [Date index for 2005/11/22]

From: David Steinbrunner
Subject: Re: [CDBI] DBI's last_insert_id and Class::DBI's _auto_increment_value
Date: 14:43 on 22 Nov 2005
Kingsley Kerce wrote:

>> To get Postgres to work without modifying CDBI I have the sequence being
>> defined but that then breaks MySQL.  The sequence lines are currently
>> commented out in the script so you can test the first case first.
> 
> Have you explored the use of Class::DBI::Pg and Class::DBI::mysql?
> They may abstract away your problem.

After looking into Class::DBI::Pg a little it does have the ability to look
up the sequence and define it in the set_up_table.  This is cool but not
exactly transparent because to get this functionality I need to have
Class::DBI::Pg be my base class which would then still excluded mysql from
working.

Unless there is some way to dynamically set your base class...  My idea is
to have a config file that will store system settings including DB host,
name, user pass and driver.  Is there some way to query the config and then
have:

use base "Class::DBI::$dbd";

It does not seem possible but I have been wrong about stranger things.
Maybe there is a different way to achieve the same type of thing?

--
David Steinbrunner



_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

Re: [CDBI] DBI's last_insert_id and Class::DBI's _auto_increment_value
David Steinbrunner 14:43 on 22 Nov 2005

Generated at 19:11 on 22 Dec 2005 by mariachi v0.52