Next / Previous / Contents / Shipman's homepage

17.7. FileData.genByHash()

This method finds all the rows in the table that have a given hash value.

deduper
# - - -   F i l e D a t a . g e n B y H a s h

    def genByHash(self, targetHash):
        '''Find all files with the same hash.
        '''
        s2 = self._Session()
        for row in s2.query(self.PathHash
                           ).filter_by(hash=targetHash
                           ).order_by('path'):
            yield row