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

Diff of /Sprout/CustomAttributes.pm

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

revision 1.34, Wed Aug 13 15:47:32 2008 UTC revision 1.35, Wed Sep 3 20:53:19 2008 UTC
# Line 1979  Line 1979 
1979      my ($self, $query, $table, @values) = @_;      my ($self, $query, $table, @values) = @_;
1980      # Declare the return value.      # Declare the return value.
1981      my @retVal = ();      my @retVal = ();
1982        # We use this hash to check for duplicates.
1983        my %dupHash = ();
1984      # Get the number of value sections we have to match.      # Get the number of value sections we have to match.
1985      my $sectionCount = scalar(@values);      my $sectionCount = scalar(@values);
1986      # Loop through the assignments found.      # Loop through the assignments found.
# Line 1991  Line 1993 
1993                                                                  ]);                                                                  ]);
1994          # Form the key from the real key and the sub key.          # Form the key from the real key and the sub key.
1995          my $key = $self->JoinKey($realKey, $subKey);          my $key = $self->JoinKey($realKey, $subKey);
1996            # Check for a duplicate.
1997            my $wholeThing = join($self->{splitter}, $id, $key, $valueString);
1998            if (! $dupHash{$wholeThing}) {
1999                # It's okay, we're not a duplicate. Insure we don't duplicate this result.
2000                $dupHash{$wholeThing} = 1;
2001          # Break the value into sections.          # Break the value into sections.
2002          my @sections = split($self->{splitter}, $valueString);          my @sections = split($self->{splitter}, $valueString);
2003          # Match each section against the incoming values. We'll assume we're          # Match each section against the incoming values. We'll assume we're
# Line 2016  Line 2023 
2023              push @retVal, [$id, $key, @sections];              push @retVal, [$id, $key, @sections];
2024          }          }
2025      }      }
2026        }
2027      # Return the rows found.      # Return the rows found.
2028      return @retVal;      return @retVal;
2029  }  }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3