MCPcopy Create free account
hub / github.com/ZyphrZero/z.ai2api_python / get_sync_connection

Method get_sync_connection

app/services/token_dao.py:44–49  ·  view source on GitHub ↗

获取同步数据库连接(用于初始化)

(self)

Source from the content-addressed store, hash-verified

42 await conn.close()
43
44 def get_sync_connection(self):
45 """获取同步数据库连接(用于初始化)"""
46 conn = sqlite3.connect(self.db_path)
47 # 启用外键约束
48 conn.execute("PRAGMA foreign_keys = ON")
49 return conn
50
51 async def init_database(self):
52 """初始化数据库表结构"""

Callers 1

init_databaseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected