[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.26, Tue Oct 18 06:47:46 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 872  Line 877 
877      my $dbh = $self->{_dbh};      my $dbh = $self->{_dbh};
878      my $command = "SELECT DISTINCT " . join('.*, ', @{$objectNames}) . ".* FROM " .      my $command = "SELECT DISTINCT " . join('.*, ', @{$objectNames}) . ".* FROM " .
879                  join(', ', @{$objectNames});                  join(', ', @{$objectNames});
880        Trace("SQL = $command") if T(SQL => 4);
881      # Check for a filter clause.      # Check for a filter clause.
882      if ($filterClause) {      if ($filterClause) {
883          # Here we have one, so we convert its field names and add it to the query. First,          # Here we have one, so we convert its field names and add it to the query. First,
# Line 1352  Line 1358 
1358              }              }
1359          }          }
1360      }      }
     # Commit the database changes.  
     $dbh->commit_tran;  
1361      # Analyze the table to improve performance.      # Analyze the table to improve performance.
1362      $dbh->vacuum_it($relationName);      $dbh->vacuum_it($relationName);
1363      # Return the statistics.      # Return the statistics.

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3