mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 03:15:06 +08:00
14 lines
433 B
Python
14 lines
433 B
Python
from __future__ import annotations
|
|
|
|
import sqlalchemy.ext.asyncio as sqlalchemy_asyncio
|
|
|
|
from .. import database
|
|
|
|
|
|
@database.manager_class("sqlite")
|
|
class SQLiteDatabaseManager(database.BaseDatabaseManager):
|
|
"""SQLite 数据库管理类"""
|
|
|
|
async def initialize(self) -> None:
|
|
self.engine = sqlalchemy_asyncio.create_async_engine(f"sqlite+aiosqlite:///{self.ap.system_cfg.data['persistence']['sqlite']['path']}")
|