mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 20:14:51 +00:00
11 lines
299 B
Python
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)
|