MCPcopy Index your code
hub / github.com/dbcli/mycli / query_has_where_clause

Function query_has_where_clause

mycli/packages/sql_utils.py:356–358  ·  view source on GitHub ↗

Check if the query contains a where-clause.

(query: str)

Source from the content-addressed store, hash-verified

354
355
356def 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"

Callers 2

is_destructiveFunction · 0.85

Calls

no outgoing calls

Tested by 1