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

Method is_set

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

Source from the content-addressed store, hash-verified

161 return statements_without_comments.upper().startswith("SHOW")
162
163 def is_set(self) -> bool:
164 # Remove comments
165 statements_without_comments = sqlparse.format(
166 self.stripped(), strip_comments=True
167 )
168 # Set statements will only be the first statement
169 return statements_without_comments.upper().startswith("SET")
170
171 def is_unknown(self) -> bool:
172 return self._parsed[0].get_type() == "UNKNOWN"

Callers 2

test_setMethod · 0.95
is_readonly_queryMethod · 0.80

Calls 1

strippedMethod · 0.95

Tested by 1

test_setMethod · 0.76