Add support for using executemany

This commit is contained in:
Erik Johnston 2015-05-05 15:13:25 +01:00
parent 1692dc019d
commit 43c2e8deae
5 changed files with 99 additions and 61 deletions

View file

@ -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,