@@ -876,7 +876,7 @@ def _update_current_state_txn(
876
876
WHERE room_id = ? AND type = ? AND state_key = ?
877
877
)
878
878
"""
879
- txn .executemany (
879
+ txn .execute_batch (
880
880
sql ,
881
881
(
882
882
(
@@ -895,7 +895,7 @@ def _update_current_state_txn(
895
895
)
896
896
# Now we actually update the current_state_events table
897
897
898
- txn .executemany (
898
+ txn .execute_batch (
899
899
"DELETE FROM current_state_events"
900
900
" WHERE room_id = ? AND type = ? AND state_key = ?" ,
901
901
(
@@ -907,7 +907,7 @@ def _update_current_state_txn(
907
907
# We include the membership in the current state table, hence we do
908
908
# a lookup when we insert. This assumes that all events have already
909
909
# been inserted into room_memberships.
910
- txn .executemany (
910
+ txn .execute_batch (
911
911
"""INSERT INTO current_state_events
912
912
(room_id, type, state_key, event_id, membership)
913
913
VALUES (?, ?, ?, ?, (SELECT membership FROM room_memberships WHERE event_id = ?))
@@ -927,7 +927,7 @@ def _update_current_state_txn(
927
927
# we have no record of the fact the user *was* a member of the
928
928
# room but got, say, state reset out of it.
929
929
if to_delete or to_insert :
930
- txn .executemany (
930
+ txn .execute_batch (
931
931
"DELETE FROM local_current_membership"
932
932
" WHERE room_id = ? AND user_id = ?" ,
933
933
(
@@ -938,7 +938,7 @@ def _update_current_state_txn(
938
938
)
939
939
940
940
if to_insert :
941
- txn .executemany (
941
+ txn .execute_batch (
942
942
"""INSERT INTO local_current_membership
943
943
(room_id, user_id, event_id, membership)
944
944
VALUES (?, ?, ?, (SELECT membership FROM room_memberships WHERE event_id = ?))
@@ -1738,7 +1738,7 @@ def _set_push_actions_for_event_and_users_txn(
1738
1738
"""
1739
1739
1740
1740
if events_and_contexts :
1741
- txn .executemany (
1741
+ txn .execute_batch (
1742
1742
sql ,
1743
1743
(
1744
1744
(
@@ -1767,7 +1767,7 @@ def _set_push_actions_for_event_and_users_txn(
1767
1767
1768
1768
# Now we delete the staging area for *all* events that were being
1769
1769
# persisted.
1770
- txn .executemany (
1770
+ txn .execute_batch (
1771
1771
"DELETE FROM event_push_actions_staging WHERE event_id = ?" ,
1772
1772
((event .event_id ,) for event , _ in all_events_and_contexts ),
1773
1773
)
@@ -1886,7 +1886,7 @@ def _update_backward_extremeties(self, txn, events):
1886
1886
" )"
1887
1887
)
1888
1888
1889
- txn .executemany (
1889
+ txn .execute_batch (
1890
1890
query ,
1891
1891
[
1892
1892
(e_id , ev .room_id , e_id , ev .room_id , e_id , ev .room_id , False )
@@ -1900,7 +1900,7 @@ def _update_backward_extremeties(self, txn, events):
1900
1900
"DELETE FROM event_backward_extremities"
1901
1901
" WHERE event_id = ? AND room_id = ?"
1902
1902
)
1903
- txn .executemany (
1903
+ txn .execute_batch (
1904
1904
query ,
1905
1905
[
1906
1906
(ev .event_id , ev .room_id )
0 commit comments