MCPcopy
hub / github.com/apache/superset / is_valid_cvas

Method is_valid_cvas

superset/sql_parse.py:142–144  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

140 return parsed[-1].get_type() == "SELECT"
141
142 def is_valid_cvas(self) -> bool:
143 parsed = sqlparse.parse(self.strip_comments())
144 return len(parsed) == 1 and parsed[0].get_type() == "SELECT"
145
146 def is_explain(self) -> bool:
147 # Remove comments

Callers 2

execute_sql_statementsFunction · 0.95
test_is_valid_cvasMethod · 0.95

Calls 1

strip_commentsMethod · 0.95

Tested by 1

test_is_valid_cvasMethod · 0.76