mirror of
https://github.com/element-hq/synapse
synced 2024-07-02 13:33:35 +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:
|
# TODO All these columns are nullable, but we don't expect that:
|
||||||
# https://github.com/matrix-org/synapse/issues/16467
|
# https://github.com/matrix-org/synapse/issues/16467
|
||||||
rows = cast(
|
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(
|
await self.db_pool.simple_select_many_batch(
|
||||||
table="presence_stream",
|
table="presence_stream",
|
||||||
column="user_id",
|
column="user_id",
|
||||||
|
@ -419,7 +431,19 @@ class PresenceStore(PresenceBackgroundUpdateStore, CacheInvalidationWorkerStore)
|
||||||
# TODO All these columns are nullable, but we don't expect that:
|
# TODO All these columns are nullable, but we don't expect that:
|
||||||
# https://github.com/matrix-org/synapse/issues/16467
|
# https://github.com/matrix-org/synapse/issues/16467
|
||||||
rows = cast(
|
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(
|
await self.db_pool.runInteraction(
|
||||||
"get_presence_for_all_users",
|
"get_presence_for_all_users",
|
||||||
self.db_pool.simple_select_list_paginate_txn,
|
self.db_pool.simple_select_list_paginate_txn,
|
||||||
|
|
Loading…
Reference in a new issue