pyrofork/pyrogram/storage/sqlite/cursor.py
wulan17 fb5aff5e21
PyroFork: storage: sqlite: fix derps
Signed-off-by: wulan17 <wulan17@nusantararom.org>
2023-06-27 17:02:13 +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)