mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 10:04:11 -04:00
Add support for using executemany
This commit is contained in:
parent
1692dc019d
commit
43c2e8deae
5 changed files with 99 additions and 61 deletions
|
@ -104,18 +104,20 @@ class StateStore(SQLBaseStore):
|
|||
},
|
||||
)
|
||||
|
||||
for state in state_events.values():
|
||||
self._simple_insert_txn(
|
||||
txn,
|
||||
table="state_groups_state",
|
||||
values={
|
||||
self._simple_insert_many_txn(
|
||||
txn,
|
||||
table="state_groups_state",
|
||||
values=[
|
||||
{
|
||||
"state_group": state_group,
|
||||
"room_id": state.room_id,
|
||||
"type": state.type,
|
||||
"state_key": state.state_key,
|
||||
"event_id": state.event_id,
|
||||
},
|
||||
)
|
||||
}
|
||||
for state in state_events.values()
|
||||
],
|
||||
)
|
||||
|
||||
self._simple_insert_txn(
|
||||
txn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue