From: Jakob Cornell Date: Sun, 17 Apr 2022 19:06:14 +0000 (-0500) Subject: Add necessary type casts to verify DML X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c80f878278dd7c7458858de61a635771ba59675;p=eros.git Add necessary type casts to verify DML --- diff --git a/disk_jumble/src/disk_jumble/verify.py b/disk_jumble/src/disk_jumble/verify.py index f5db002..60a53e5 100644 --- a/disk_jumble/src/disk_jumble/verify.py +++ b/disk_jumble/src/disk_jumble/verify.py @@ -85,7 +85,7 @@ def _get_v1_worklist(conn, disk_id: int, block_ranges: List[NumericRange]) -> Li diskjumble.slab left join bittorrent.torrent_info on digest(info, 'sha1') = entity_id ) - where disk_id = %s and disk_blocks && any (%s) + where disk_id = %s and disk_blocks && any (%s::int8range[]) """, (disk_id, block_ranges) ) @@ -221,7 +221,7 @@ def _get_v2_worklist(conn, disk_id: int, block_ranges: List[NumericRange]) -> Li from filtered ) select * from exploded - where block <@ any (%(block_ranges)s) + where block <@ any (%(block_ranges)s::int8range[]) order by block """, {