From 5004032c7cfaeff86cfbe5e543b14ce864d6f59c Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 2 Feb 2026 10:05:03 +0800 Subject: [PATCH] fix: check sql only contain read operation --- backend/apps/db/db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/apps/db/db.py b/backend/apps/db/db.py index 239b5101..1d0477c0 100644 --- a/backend/apps/db/db.py +++ b/backend/apps/db/db.py @@ -582,6 +582,8 @@ def check_sql_read(sql: str, ds: CoreDatasource | AssistantOutDsSchema): dialect = None if ds.type == "mysql" or ds.type == "doris" or ds.type == "starrocks": dialect = 'mysql' + elif ds.type == "sqlServer": + dialect = 'tsql' statements = sqlglot.parse(sql, dialect=dialect)