Check if any queries start with any item from *prefixes*.
(queries: str, prefixes: list[str])
| 346 | |
| 347 | |
| 348 | def queries_start_with(queries: str, prefixes: list[str]) -> bool: |
| 349 | """Check if any queries start with any item from *prefixes*.""" |
| 350 | for query in sqlparse.split(queries): |
| 351 | if query and query_starts_with(query, prefixes) is True: |
| 352 | return True |
| 353 | return False |
| 354 | |
| 355 | |
| 356 | def query_has_where_clause(query: str) -> bool: |