@@ -417,7 +417,7 @@ def update_cache_txn(txn):
417417 " WHERE media_origin = ? AND media_id = ?"
418418 )
419419
420- txn .executemany (
420+ txn .execute_batch (
421421 sql ,
422422 (
423423 (time_ms , media_origin , media_id )
@@ -430,7 +430,7 @@ def update_cache_txn(txn):
430430 " WHERE media_id = ?"
431431 )
432432
433- txn .executemany (sql , ((time_ms , media_id ) for media_id in local_media ))
433+ txn .execute_batch (sql , ((time_ms , media_id ) for media_id in local_media ))
434434
435435 return await self .db_pool .runInteraction (
436436 "update_cached_last_access_time" , update_cache_txn
@@ -557,7 +557,7 @@ async def delete_url_cache(self, media_ids):
557557 sql = "DELETE FROM local_media_repository_url_cache WHERE media_id = ?"
558558
559559 def _delete_url_cache_txn (txn ):
560- txn .executemany (sql , [(media_id ,) for media_id in media_ids ])
560+ txn .execute_batch (sql , [(media_id ,) for media_id in media_ids ])
561561
562562 return await self .db_pool .runInteraction (
563563 "delete_url_cache" , _delete_url_cache_txn
@@ -586,11 +586,11 @@ async def delete_url_cache_media(self, media_ids):
586586 def _delete_url_cache_media_txn (txn ):
587587 sql = "DELETE FROM local_media_repository WHERE media_id = ?"
588588
589- txn .executemany (sql , [(media_id ,) for media_id in media_ids ])
589+ txn .execute_batch (sql , [(media_id ,) for media_id in media_ids ])
590590
591591 sql = "DELETE FROM local_media_repository_thumbnails WHERE media_id = ?"
592592
593- txn .executemany (sql , [(media_id ,) for media_id in media_ids ])
593+ txn .execute_batch (sql , [(media_id ,) for media_id in media_ids ])
594594
595595 return await self .db_pool .runInteraction (
596596 "delete_url_cache_media" , _delete_url_cache_media_txn
0 commit comments