mirror of
https://github.com/element-hq/synapse
synced 2024-06-30 14:53:29 +00:00
Added missing type hints to DB queries
This commit is contained in:
parent
16a21470dd
commit
c893e5a577
|
@ -276,7 +276,19 @@ class PresenceStore(PresenceBackgroundUpdateStore, CacheInvalidationWorkerStore)
|
|||
# TODO All these columns are nullable, but we don't expect that:
|
||||
# https://github.com/matrix-org/synapse/issues/16467
|
||||
rows = cast(
|
||||
List[Tuple[str, str, int, int, int, Optional[str], Union[int, bool]]],
|
||||
List[
|
||||
Tuple[
|
||||
str,
|
||||
str,
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
Optional[str],
|
||||
Union[int, bool],
|
||||
Optional[str],
|
||||
Optional[str],
|
||||
]
|
||||
],
|
||||
await self.db_pool.simple_select_many_batch(
|
||||
table="presence_stream",
|
||||
column="user_id",
|
||||
|
@ -419,7 +431,19 @@ class PresenceStore(PresenceBackgroundUpdateStore, CacheInvalidationWorkerStore)
|
|||
# TODO All these columns are nullable, but we don't expect that:
|
||||
# https://github.com/matrix-org/synapse/issues/16467
|
||||
rows = cast(
|
||||
List[Tuple[str, str, int, int, int, Optional[str], Union[int, bool]]],
|
||||
List[
|
||||
Tuple[
|
||||
str,
|
||||
str,
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
Optional[str],
|
||||
Union[int, bool],
|
||||
Optional[str],
|
||||
Optional[str],
|
||||
]
|
||||
],
|
||||
await self.db_pool.runInteraction(
|
||||
"get_presence_for_all_users",
|
||||
self.db_pool.simple_select_list_paginate_txn,
|
||||
|
|
Loading…
Reference in a new issue