Author: spadkins
Date: Fri Apr 17 10:06:22 2009
New Revision: 12706
Modified:
p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm
Log:
enable {dbi_post_connect_stmt} (allows case insensitivity on Oracle)
Modified: p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm (original)
+++ p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm Fri Apr 17 10:06:22 2009
@@ -182,7 +182,15 @@
my $attr = $self->_attr();
eval {
- $self->{dbh} = DBI->connect($dsn, $self->{dbuser},
$self->{dbpass}, $attr);
+ my $dbh = DBI->connect($dsn, $self->{dbuser}, $self->{dbpass},
$attr);
+ if ($self->{dbi_post_connect_stmt}) {
+ my $stmts = $self->{dbi_post_connect_stmt};
+ $stmts =~ s/;$//;
+ foreach my $stmt (split(/\s*;\s*/, $stmts)) {
+ $dbh->do($stmt);
+ }
+ }
+ $self->{dbh} = $dbh;
};
if (my $e = $@) {
if ($self->is_retryable_connection_error($e)) {