diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-08-16 22:45:18 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-08-16 22:45:18 +0200 |
commit | 1aa2948aaaa2a8e2474918ef57ab84a67d80e804 (patch) | |
tree | 3a3c55c9cd53f9ba4cbd3c9a769603069b45718f | |
parent | 069f5412dd1ae1f4695a168ae17aded9fb4461fb (diff) | |
download | debian-dedup-1aa2948aaaa2a8e2474918ef57ab84a67d80e804.tar.gz |
make debian version_compare available in sql
-rw-r--r-- | dedup/utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dedup/utils.py b/dedup/utils.py index 2fae9fd..6fb233b 100644 --- a/dedup/utils.py +++ b/dedup/utils.py @@ -1,3 +1,5 @@ +from debian.debian_support import version_compare + def fetchiter(cursor): rows = cursor.fetchmany() while rows: @@ -5,3 +7,6 @@ def fetchiter(cursor): yield row rows = cursor.fetchmany() +def sql_add_version_compare(db): + db.create_collation("debian_version", version_compare) + db.create_function("debian_version_compare", 2, version_compare) |