MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / get_database_json

Function get_database_json

script/check_sql.py:5–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import sys
4
5def get_database_json():
6 # 读取databases.json的内容
7 db_json_path = '/www/server/panel/config/databases.json'
8 with open(db_json_path, 'r', encoding='utf-8') as f:
9 return json.load(f)
10
11def create_table_if_not_exists(db_obj, table_name, create_table_sql):
12 # 尝试创建表,如果表不存在

Callers 1

Calls 2

openFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected