[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.23, Thu Sep 15 01:46:56 2005 UTC revision 1.27, Tue Oct 18 06:52:35 2005 UTC
# Line 660  Line 660 
660          # Get the index's uniqueness flag.          # Get the index's uniqueness flag.
661          my $unique = (exists $indexData->{Unique} ? $indexData->{Unique} : 'false');          my $unique = (exists $indexData->{Unique} ? $indexData->{Unique} : 'false');
662          # Create the index.          # Create the index.
663          $dbh->create_index(idx => $indexName, tbl => $relationName, flds => $flds, unique => $unique);          my $rv = $dbh->create_index(idx => $indexName, tbl => $relationName,
664                                        flds => $flds, unique => $unique);
665            if ($rv) {
666          Trace("Index created: $indexName for $relationName ($flds)") if T(1);          Trace("Index created: $indexName for $relationName ($flds)") if T(1);
667            } else {
668                Confess("Error creating index $indexName for $relationName using ($flds): " . $dbh->error_message());
669            }
670      }      }
671  }  }
672    
# Line 976  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 1352  Line 1357 
1357              }              }
1358          }          }
1359      }      }
     # Commit the database changes.  
     $dbh->commit_tran;  
1360      # Analyze the table to improve performance.      # Analyze the table to improve performance.
1361      $dbh->vacuum_it($relationName);      $dbh->vacuum_it($relationName);
1362      # Return the statistics.      # Return the statistics.

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.27

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3