This commit is contained in:
2026-07-26 17:57:44 +08:00
parent a555f785ba
commit 069f1bafe1
27 changed files with 4893 additions and 3846 deletions
+6 -2
View File
@@ -22,12 +22,16 @@ class AsyncSQLiteDB:
await self.close()
async def connect(self):
if self.conn is not None:
return
self.conn = await aiosqlite.connect(self.db_path)
self.conn.row_factory = aiosqlite.Row
async def close(self):
if self.conn:
await self.conn.close()
connection = self.conn
self.conn = None
if connection:
await connection.close()
# ======================
# 基础执行