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();
# 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;