Check if the query contains a where-clause.
(query: str)
| 354 | |
| 355 | |
| 356 | def query_has_where_clause(query: str) -> bool: |
| 357 | """Check if the query contains a where-clause.""" |
| 358 | return any(isinstance(token, sqlparse.sql.Where) for token_list in sqlparse.parse(query) for token in token_list) |
| 359 | |
| 360 | |
| 361 | # todo: handle "UPDATE LOW_PRIORITY" and "UPDATE IGNORE" |
no outgoing calls