MCPcopy Index your code
hub / github.com/apache/superset / is_select

Method is_select

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

Source from the content-addressed store, hash-verified

131 return self._limit
132
133 def is_select(self) -> bool:
134 # make sure we strip comments; prevents a bug with coments in the CTE
135 parsed = sqlparse.parse(self.strip_comments())
136 return parsed[0].get_type() == "SELECT"
137
138 def is_valid_ctas(self) -> bool:
139 parsed = sqlparse.parse(self.strip_comments())

Callers 7

test_setMethod · 0.95
test_showMethod · 0.95
test_explainMethod · 0.95
test_cte_with_commentsFunction · 0.95
is_readonly_queryMethod · 0.80
is_select_queryMethod · 0.80

Calls 1

strip_commentsMethod · 0.95

Tested by 5

test_setMethod · 0.76
test_showMethod · 0.76
test_explainMethod · 0.76
test_cte_with_commentsFunction · 0.76