Merge pull request #1 from quqibing/quqibing-patch-1

转换编辑器查询sql返回结果的类型, 否则fastapi会报错.
This commit is contained in:
曲奇饼 2023-09-28 16:37:58 +08:00 committed by GitHub
commit 91972f6fd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,6 +120,8 @@ async def editor_sql_run(run_param: dict = Body()):
try:
start_time = time.time() * 1000
colunms, sql_result = conn.query_ex(sql)
# 转换结果类型
sql_result = [tuple(x) for x in sql_result]
# 计算执行耗时
end_time = time.time() * 1000
sql_run_data: SqlRunData = SqlRunData(