mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 18:24:56 -04:00
Convert simple_select_one and simple_select_one_onecol to async (#8162)
This commit is contained in:
parent
56efa9ec71
commit
4c6c56dc58
25 changed files with 220 additions and 113 deletions
|
@ -223,15 +223,15 @@ class EndToEndRoomKeyStore(SQLBaseStore):
|
|||
|
||||
return ret
|
||||
|
||||
def count_e2e_room_keys(self, user_id, version):
|
||||
async def count_e2e_room_keys(self, user_id: str, version: str) -> int:
|
||||
"""Get the number of keys in a backup version.
|
||||
|
||||
Args:
|
||||
user_id (str): the user whose backup we're querying
|
||||
version (str): the version ID of the backup we're querying about
|
||||
user_id: the user whose backup we're querying
|
||||
version: the version ID of the backup we're querying about
|
||||
"""
|
||||
|
||||
return self.db_pool.simple_select_one_onecol(
|
||||
return await self.db_pool.simple_select_one_onecol(
|
||||
table="e2e_room_keys",
|
||||
keyvalues={"user_id": user_id, "version": version},
|
||||
retcol="COUNT(*)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue