[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.3, Fri Sep 9 14:52:21 2005 UTC revision 1.4, Sun Sep 11 17:05:57 2005 UTC
# Line 64  Line 64 
64      }      }
65      # Determine the name for this relation's load file.      # Determine the name for this relation's load file.
66      my $fileName = "$directory/$relationName.dtx";      my $fileName = "$directory/$relationName.dtx";
67        # If this is a primary entity relation, sort the output to remove
68        # duplicate keys.
69        my $fileString = ($erdb->IsEntity($relationName) ?
70                            "| sort +0 -1 -u >$fileName" :
71                            ">$fileName");
72      # Open the output file and remember its handle.      # Open the output file and remember its handle.
73      my $fileHandle = Open(undef, ">$fileName");      my $fileHandle = Open(undef, $fileString);
74      # Create the $erload object.      # Create the $erload object.
75      my $retVal = {      my $retVal = {
76                    dbh => $erdb,                    dbh => $erdb,
# Line 120  Line 125 
125      # Update the statistics.      # Update the statistics.
126      $self->{fileSize} += $lineLength;      $self->{fileSize} += $lineLength;
127      $self->{lineCount} ++;      $self->{lineCount} ++;
128        $self->Add("lineOut");
129    }
130    
131    =head3 Add
132    
133    C<< my  = $stats->Add($statName); >>
134    
135    Increment the specified statistic.
136    
137    =over 4
138    
139    =item statName
140    
141    Name of the statistic to increment.
142    
143    =back
144    
145    =cut
146    #: Return Type ;
147    sub Add {
148        # Get the parameters.
149        my ($self, $statName) = @_;
150        # Increment the statistic.
151        $self->{stats}->Add($statName);
152  }  }
153    
154  =head3 Finish  =head3 Finish

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3