Returns a list of SQL statements as strings, stripped
(self)
| 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]: |