[Bio] / Sprout / ERDB.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDB.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24, Wed Oct 12 02:56:04 2005 UTC revision 1.28, Thu Oct 20 09:31:02 2005 UTC
# Line 981  Line 981 
981              $command .= " ORDER BY $orderClause";              $command .= " ORDER BY $orderClause";
982          }          }
983      }      }
984      Trace("SQL query: $command") if T(3);      Trace("SQL query: $command") if T(SQL => 4);
985      Trace("PARMS: '" . (join "', '", @params) . "'") if (T(4) && (@params > 0));      Trace("PARMS: '" . (join "', '", @params) . "'") if (T(SQL => 4) && (@params > 0));
986      my $sth = $dbh->prepare_command($command);      my $sth = $dbh->prepare_command($command);
987      # Execute it with the parameters bound in.      # Execute it with the parameters bound in.
988      $sth->execute(@params) || Confess("SELECT error" . $sth->errstr());      $sth->execute(@params) || Confess("SELECT error" . $sth->errstr());
# Line 1293  Line 1293 
1293    
1294  =item RETURN  =item RETURN
1295    
1296  Returns a statistical object containing the number of records read and a list of  Returns a statistical object containing a list of the error messages.
 the error messages.  
1297    
1298  =back  =back
1299    
# Line 1308  Line 1307 
1307      Trace("Loading table $relationName from $fileName") if T(2);      Trace("Loading table $relationName from $fileName") if T(2);
1308      # Get the database handle.      # Get the database handle.
1309      my $dbh = $self->{_dbh};      my $dbh = $self->{_dbh};
     # Start a transaction.  
     $dbh->begin_tran;  
1310      # Get the input file size.      # Get the input file size.
1311      my $fileSize = -s $fileName;      my $fileSize = -s $fileName;
1312      # Get the relation data.      # Get the relation data.
# Line 1359  Line 1356 
1356              }              }
1357          }          }
1358      }      }
     # Commit the database changes.  
     $dbh->commit_tran;  
1359      # Analyze the table to improve performance.      # Analyze the table to improve performance.
1360      $dbh->vacuum_it($relationName);      $dbh->vacuum_it($relationName);
1361      # Return the statistics.      # Return the statistics.
# Line 1640  Line 1635 
1635  =cut  =cut
1636    
1637  sub _GetLoadStats {  sub _GetLoadStats {
1638      return Stats->new('records');      return Stats->new();
1639  }  }
1640    
1641  =head3 GenerateFields  =head3 GenerateFields

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.28

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3