[Rt-commit] r4046 - in Jifty-DBI/trunk: . lib/Jifty/DBI lib/Jifty/DBI/Handle

jesse at bestpractical.com jesse at bestpractical.com
Sun Nov 6 19:21:38 EST 2005


Author: jesse
Date: Sun Nov  6 19:21:37 2005
New Revision: 4046

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm
   Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Oracle.pm
Log:
 r18433 at truegrounds:  jesse | 2005-11-06 19:20:09 -0500
 LowerCasing of QueryString


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle.pm	Sun Nov  6 19:21:37 2005
@@ -11,7 +11,7 @@
 
 $TRANSDEPTH = 0;
 
-$VERSION = '$Version$';
+$VERSION = '0.01';
 
 =head1 NAME
 
@@ -326,12 +326,12 @@
         push @bind, $value;
     }
 
-    my $QueryString = "INSERT INTO $table ("
+    my $query_string = "INSERT INTO $table ("
         . CORE::join( ", ", @cols )
         . ") VALUES " . "("
         . CORE::join( ", ", @vals ) . ")";
 
-    my $sth = $self->simple_query( $QueryString, @bind );
+    my $sth = $self->simple_query( $query_string, @bind );
     return ($sth);
 }
 
@@ -411,23 +411,23 @@
 
 sub simple_query {
     my $self        = shift;
-    my $QueryString = shift;
+    my $query_string = shift;
     my @bind_values;
     @bind_values = (@_) if (@_);
 
-    my $sth = $self->dbh->prepare($QueryString);
+    my $sth = $self->dbh->prepare($query_string);
     unless ($sth) {
         if ($DEBUG) {
-            die "$self couldn't prepare the query '$QueryString'"
+            die "$self couldn't prepare the query '$query_string'"
                 . $self->dbh->errstr . "\n";
         }
         else {
-            warn "$self couldn't prepare the query '$QueryString'"
+            warn "$self couldn't prepare the query '$query_string'"
                 . $self->dbh->errstr . "\n";
             my $ret = Class::ReturnValue->new();
             $ret->as_error(
                 errno   => '-1',
-                message => "Couldn't prepare the query '$QueryString'."
+                message => "Couldn't prepare the query '$query_string'."
                     . $self->dbh->errstr,
                 do_backtrace => undef
             );
@@ -459,24 +459,24 @@
         eval { $executed = $sth->execute(@bind_values) };
     }
     if ( $self->log_sql_statements ) {
-        $self->_log_sql_statement( $QueryString,
+        $self->_log_sql_statement( $query_string,
             Time::HiRes::time() - $basetime, @bind_values );
 
     }
 
     if ( $@ or !$executed ) {
         if ($DEBUG) {
-            die "$self couldn't execute the query '$QueryString'"
+            die "$self couldn't execute the query '$query_string'"
                 . $self->dbh->errstr . "\n";
 
         }
         else {
-            Carp::cluck "$self couldn't execute the query '$QueryString'";
+            Carp::cluck "$self couldn't execute the query '$query_string'";
 
             my $ret = Class::ReturnValue->new();
             $ret->as_error(
                 errno   => '-1',
-                message => "Couldn't execute the query '$QueryString'"
+                message => "Couldn't execute the query '$query_string'"
                     . $self->dbh->errstr,
                 do_backtrace => undef
             );

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Oracle.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Oracle.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Oracle.pm	Sun Nov  6 19:21:37 2005
@@ -62,19 +62,19 @@
     # Oracle Hack to replace non-supported mysql_rowid call
 
     my %attribs = @_;
-    my ( $unique_id, $QueryString );
+    my ( $unique_id, $query_string );
 
     if ( $attribs{'Id'} || $attribs{'id'} ) {
         $unique_id = ( $attribs{'Id'} ? $attribs{'Id'} : $attribs{'id'} );
     }
     else {
 
-        $QueryString = "SELECT " . $table . "_seq.nextval FROM DUAL";
+        $query_string = "SELECT " . $table . "_seq.nextval FROM DUAL";
 
-        $sth = $self->simple_query($QueryString);
+        $sth = $self->simple_query($query_string);
         if ( !$sth ) {
             if ($main::debug) {
-                die "Error with $QueryString";
+                die "Error with $query_string";
             }
             else {
                 return (undef);
@@ -97,7 +97,7 @@
 
     unless ($sth) {
         if ($main::debug) {
-            die "Error with $QueryString: " . $self->dbh->errstr;
+            die "Error with $query_string: " . $self->dbh->errstr;
         }
         else {
             return (undef);


More information about the Rt-commit mailing list