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); >> |