--- trunk/index_DBI.pm 2003/03/22 23:40:14 45 +++ trunk/index_DBI.pm 2003/06/01 13:46:42 50 @@ -17,8 +17,12 @@ my $self = {}; bless($self, $class); - # FIX: config params - $self->{dbh} = DBI->connect("DBI:Pg:dbname=webpac","dpavlin","") || die $DBI::errstr; + my $dbd = shift || die "need dbi_dbd= in [global] section of configuration file"; + my $dsn = shift || die "need dbi_dsn= in [global] section of configuration file"; + my $user = shift || die "need dbi_user= in [global] section of configuration file"; + my $passwd = shift || die "need dbi_passwd= in [global] section of configuration file"; + + $self->{dbh} = DBI->connect("DBI:$dbd:$dsn",$user,$passwd) || die $DBI::errstr; # begin transaction $self->{dbh}->begin_work || die $self->{dbh}->errstr(); @@ -181,6 +185,9 @@ # FIX print STDERR "creating ord for $table...\n"; create_ord($table); + undef $sth_cache{$table."select"}; + undef $sth_cache{$table."insert"}; + undef $sth_cache{$table."update"}; } $self->{dbh}->disconnect;