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, |
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 |