[Bast-commits] r7082 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Tue Jul 21 16:16:34 GMT 2009


Author: caelum
Date: 2009-07-21 16:16:34 +0000 (Tue, 21 Jul 2009)
New Revision: 7082

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
Log:
show Oracle datetime_setup alter session statements in debug output

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm	2009-07-21 14:51:55 UTC (rev 7081)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm	2009-07-21 16:16:34 UTC (rev 7082)
@@ -5,7 +5,7 @@
 
 =head1 NAME
 
-DBIx::Class::Storage::DBI::Oracle::Generic - Automatic primary key class for Oracle
+DBIx::Class::Storage::DBI::Oracle::Generic - Oracle Support for DBIx::Class
 
 =head1 SYNOPSIS
 
@@ -52,7 +52,7 @@
   };
 
   # trigger_body is a LONG
-  $dbh->{LongReadLen} = 64 * 1024 if ($dbh->{LongReadLen} < 64 * 1024);
+  local $dbh->{LongReadLen} = 64 * 1024 if ($dbh->{LongReadLen} < 64 * 1024);
 
   my $sth;
 
@@ -195,7 +195,6 @@
 
 sub connect_call_datetime_setup {
   my $self = shift;
-  my $dbh  = $self->dbh;
 
   my $date_format = $ENV{NLS_DATE_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS';
   my $timestamp_format = $ENV{NLS_TIMESTAMP_FORMAT} ||=
@@ -203,9 +202,11 @@
   my $timestamp_tz_format = $ENV{NLS_TIMESTAMP_TZ_FORMAT} ||=
     'YYYY-MM-DD HH24:MI:SS.FF TZHTZM';
 
-  $dbh->do("alter session set nls_date_format = '$date_format'");
-  $dbh->do("alter session set nls_timestamp_format = '$timestamp_format'");
-  $dbh->do("alter session set nls_timestamp_tz_format='$timestamp_tz_format'");
+  $self->_do_query("alter session set nls_date_format = '$date_format'");
+  $self->_do_query(
+"alter session set nls_timestamp_format = '$timestamp_format'");
+  $self->_do_query(
+"alter session set nls_timestamp_tz_format='$timestamp_tz_format'");
 }
 
 sub _svp_begin {
@@ -266,12 +267,10 @@
     $self->dbh->do("ROLLBACK TO SAVEPOINT $name")
 }
 
-=head1 AUTHORS
+=head1 AUTHOR
 
-Andy Grundman <andy at hybridized.org>
+See L<DBIx::Class/CONTRIBUTORS>.
 
-Scott Connelly <scottsweep at yahoo.com>
-
 =head1 LICENSE
 
 You may distribute this code under the same terms as Perl itself.




More information about the Bast-commits mailing list