blacklist content rather than hashes
[~helmut/debian-dedup.git] / dedup / utils.py
1 from debian.debian_support import version_compare
2
3 def fetchiter(cursor):
4     rows = cursor.fetchmany()
5     while rows:
6         for row in rows:
7             yield row
8         rows = cursor.fetchmany()
9
10 def sql_add_version_compare(db):
11     db.create_collation("debian_version", version_compare)
12     db.create_function("debian_version_compare", 2, version_compare)