summary refs log tree commit diff
path: root/synapse/storage/database.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-20 17:52:08 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-20 17:52:08 +0100
commit255860b00a5fd3e7c508dccefab7bda7ccae1187 (patch)
tree531b1b802e0957e3f4840ec47ff72c317f7e8fcd /synapse/storage/database.py
parentMerge commit '912e02491' into anoa/dinsic_release_1_21_x (diff)
parentFix typing for `@cached` wrapped functions (#8240) (diff)
downloadsynapse-255860b00a5fd3e7c508dccefab7bda7ccae1187.tar.xz
Merge commit '208e1d3eb' into anoa/dinsic_release_1_21_x
* commit '208e1d3eb':
  Fix typing for `@cached` wrapped functions (#8240)
  Remove useless changelog about reverting a #8239.
  Revert pinning of setuptools (#8239)
  Fix typing for SyncHandler (#8237)
  wrap `_get_e2e_device_keys_and_signatures_txn` in a non-txn method (#8231)
  Add an overload for simple_select_one_onecol_txn. (#8235)
Diffstat (limited to 'synapse/storage/database.py')
-rw-r--r--synapse/storage/database.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py

index 8851710d47..78ca6d8346 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py
@@ -1149,6 +1149,30 @@ class DatabasePool(object): allow_none=allow_none, ) + @overload + @classmethod + def simple_select_one_onecol_txn( + cls, + txn: LoggingTransaction, + table: str, + keyvalues: Dict[str, Any], + retcol: Iterable[str], + allow_none: Literal[False] = False, + ) -> Any: + ... + + @overload + @classmethod + def simple_select_one_onecol_txn( + cls, + txn: LoggingTransaction, + table: str, + keyvalues: Dict[str, Any], + retcol: Iterable[str], + allow_none: Literal[True] = True, + ) -> Optional[Any]: + ... + @classmethod def simple_select_one_onecol_txn( cls,