17 |
my $self = {}; |
my $self = {}; |
18 |
bless($self, $class); |
bless($self, $class); |
19 |
|
|
20 |
# FIX: config params |
my $dbd = shift || die "need dbi_dbd= in [global] section of configuration file"; |
21 |
$self->{dbh} = DBI->connect("DBI:Pg:dbname=webpac","dpavlin","") || die $DBI::errstr; |
my $dsn = shift || die "need dbi_dsn= in [global] section of configuration file"; |
22 |
|
my $user = shift || die "need dbi_user= in [global] section of configuration file"; |
23 |
|
my $passwd = shift || die "need dbi_passwd= in [global] section of configuration file"; |
24 |
|
|
25 |
|
$self->{dbh} = DBI->connect("DBI:$dbd:$dsn",$user,$passwd) || die $DBI::errstr; |
26 |
# begin transaction |
# begin transaction |
27 |
$self->{dbh}->begin_work || die $self->{dbh}->errstr(); |
$self->{dbh}->begin_work || die $self->{dbh}->errstr(); |
28 |
|
|
185 |
# FIX |
# FIX |
186 |
print STDERR "creating ord for $table...\n"; |
print STDERR "creating ord for $table...\n"; |
187 |
create_ord($table); |
create_ord($table); |
188 |
|
undef $sth_cache{$table."select"}; |
189 |
|
undef $sth_cache{$table."insert"}; |
190 |
|
undef $sth_cache{$table."update"}; |
191 |
} |
} |
192 |
|
|
193 |
$self->{dbh}->disconnect; |
$self->{dbh}->disconnect; |