[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.45, Tue Jun 6 05:05:15 2006 UTC revision 1.46, Thu Jun 8 19:42:06 2006 UTC
# Line 780  Line 780 
780          my $fieldType = $fieldTypes->[$i]->{type};          my $fieldType = $fieldTypes->[$i]->{type};
781          # If it's a hash string, digest it in place.          # If it's a hash string, digest it in place.
782          if ($fieldType eq 'hash-string') {          if ($fieldType eq 'hash-string') {
783              $fieldList->[$i] = md5_base64($fieldList->[$i]);              $fieldList->[$i] = $self->DigestKey($fieldList->[$i]);
784          }          }
785      }      }
786  }  }
787    
788    =head3 DigestKey
789    
790    C<< my $digested = $erdb->DigestKey($keyValue); >>
791    
792    Return the digested value of a symbolic key. The digested value can then be plugged into a
793    key-based search into a table with key-type hash-string.
794    
795    Currently the digesting process is independent of the database structure, but that may not
796    always be the case, so this is an instance method instead of a static method.
797    
798    =over 4
799    
800    =item keyValue
801    
802    Key value to digest.
803    
804    =item RETURN
805    
806    Digested value ofthe key.
807    
808    =back
809    
810    =cut
811    
812    sub DigestKey {
813        # Get the parameters.
814        my ($self, $keyValue) = @_;
815        # Compute the digest.
816        my $retVal = md5_base64($keyValue);
817        # Return the result.
818        return $retVal;
819    }
820    
821  =head3 CreateIndex  =head3 CreateIndex
822    
823  C<< $erdb->CreateIndex($relationName); >>  C<< $erdb->CreateIndex($relationName); >>

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3