Skip to content

Commit

Permalink
ClickHouse支持with开头的查询语句 (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
allen12921 authored Oct 16, 2022
1 parent 813a16e commit f4f2071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/engines/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def query_check(self, db_name=None, sql=""):
except IndexError:
result["bad_query"] = True
result["msg"] = "没有有效的SQL语句"
if re.match(r"^select|^show|^explain", sql, re.I) is None:
if re.match(r"^select|^show|^explain|^with", sql, re.I) is None:
result["bad_query"] = True
result["msg"] = "不支持的查询语法类型!"
if "*" in sql:
Expand Down

0 comments on commit f4f2071

Please sign in to comment.