pyrofork/pyrogram/storage/sqlite/cursor.py
wulan17 26a3e27113
PyroFork: storage: sqlite: fix derps
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-06-25 23:41:21 +07:00

11 lines
299 B
Python

from pyrogram.utils import run_sync
from sqlite3 import Cursor
from threading import Thread
class AsyncCursor(Thread):
def __init__(self, cursor: Cursor):
super().__init__()
self.cursor = cursor
async def fetchone(self):
return await run_sync(self.cursor.fetchone)