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

Method get_statements

superset/sql_parse.py:180–188  ·  view source on GitHub ↗

Returns a list of SQL statements as strings, stripped

(self)

Source from the content-addressed store, hash-verified

178 return sqlparse.format(self.stripped(), strip_comments=True)
179
180 def get_statements(self) -> List[str]:
181 """Returns a list of SQL statements as strings, stripped"""
182 statements = []
183 for statement in self._parsed:
184 if statement:
185 sql = str(statement).strip(" \n;\t")
186 if sql:
187 statements.append(sql)
188 return statements
189
190 @staticmethod
191 def _get_table(tlist: TokenList) -> Optional[Table]:

Callers 6

execute_sql_statementsFunction · 0.95
validateMethod · 0.95
estimate_query_costMethod · 0.95

Calls 1

appendMethod · 0.80