version 0.0.8

This commit is contained in:
张明明 2024-05-07 11:12:28 +08:00
parent f0a9340a51
commit a9c01a3095
3 changed files with 9 additions and 4 deletions

View File

@ -18,7 +18,7 @@ URL = 'https://github.com/miloira/wxhook'
EMAIL = '690126048@qq.com'
AUTHOR = 'Msky'
REQUIRES_PYTHON = '>=3.8.0'
VERSION = '0.0.7'
VERSION = '0.0.8'
# What packages are required for this module to be executed?
REQUIRED = [

View File

@ -1,3 +1,3 @@
from .core import Bot
version = "0.0.7"
version = "0.0.8"

View File

@ -411,8 +411,13 @@ class Bot:
def get_db_info(self) -> typing.List[DB]:
"""获取数据库句柄"""
return [DB(databaseName=item["databaseName"], handle=item["handle"],
tables=[Table(**sub_item) for sub_item in item["tables"]]) for item in self.call_api("/api/getDBInfo")]
return [
DB(databaseName=item["databaseName"], handle=item["handle"], tables=[
Table(**sub_item)
for sub_item in item["tables"]
])
for item in self.call_api("/api/getDBInfo")
]
def exec_sql(self, db_handle: int, sql: str) -> Response:
"""执行SQL命令"""