From 6ec69589de607c3547e5529deed4f256ff9120c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B2=E5=A5=87=E9=A5=BC?= Date: Thu, 28 Sep 2023 16:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2sql=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=9A=84=E7=B1=BB=E5=9E=8B,=20=E5=90=A6=E5=88=99fastapi?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update api_editor_v1.py --- pilot/openapi/api_v1/editor/api_editor_v1.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pilot/openapi/api_v1/editor/api_editor_v1.py b/pilot/openapi/api_v1/editor/api_editor_v1.py index e1b313664..4329fd493 100644 --- a/pilot/openapi/api_v1/editor/api_editor_v1.py +++ b/pilot/openapi/api_v1/editor/api_editor_v1.py @@ -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(