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

Diff of /Sprout/ERDBLoad.pm

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

revision 1.12, Thu Feb 2 21:30:05 2006 UTC revision 1.13, Wed Apr 19 03:34:15 2006 UTC
# Line 82  Line 82 
82          Trace("Relation $relationName will be loaded from $fileName.") if T(2);          Trace("Relation $relationName will be loaded from $fileName.") if T(2);
83          $fileHandle = "";          $fileHandle = "";
84      } else {      } else {
85          # If this is a primary entity relation, sort the output to remove          # If this is a primary entity relation whose key is not a hash string, sort
86          # duplicate keys.          # the output to remove duplicate keys.
87          my $fileString = ($erdb->IsEntity($relationName) ?          my $fileString = ($erdb->SortNeeded($relationName) ?
88                              "| sort +0 -1 -u -t \"\t\" >$fileName" :                              "| sort +0 -1 -u -t \"\t\" >$fileName" :
89                              ">$fileName");                              ">$fileName");
90          # Open the output file and remember its handle.          # Open the output file and remember its handle.
# Line 147  Line 147 
147      my ($self, @rawFields) = @_;      my ($self, @rawFields) = @_;
148      # Only proceed if we're not ignoring.      # Only proceed if we're not ignoring.
149      if (! $self->{ignore}) {      if (! $self->{ignore}) {
150            # Convert the hash-string fields to their digested value.
151            $self->{dbh}->DigestFields($self->{relName}, \@rawFields);
152          # Insure the field values are okay.          # Insure the field values are okay.
153          my $truncates = $self->{dbh}->VerifyFields($self->{relName}, \@rawFields);          my $truncates = $self->{dbh}->VerifyFields($self->{relName}, \@rawFields);
154          # Run through the list of field values, escaping them.          # Run through the list of field values, escaping them.

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3