mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-31 15:47:05 +00:00
Convert the type of the result returned by the SQL Editor query (#647)
Convert the SQL editor execution result to Tuple, otherwise FastAPI will report an error. fastapi: 0.99.1 DB-GPT: main branch
This commit is contained in:
commit
85e32f79ac
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user