mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 22:44:49 -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
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
from synapse.storage._base import SQLBaseStore
|
||||
|
||||
|
@ -21,8 +22,8 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
class RejectionsStore(SQLBaseStore):
|
||||
def get_rejection_reason(self, event_id):
|
||||
return self.db_pool.simple_select_one_onecol(
|
||||
async def get_rejection_reason(self, event_id: str) -> Optional[str]:
|
||||
return await self.db_pool.simple_select_one_onecol(
|
||||
table="rejections",
|
||||
retcol="reason",
|
||||
keyvalues={"event_id": event_id},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue