def METHOD_NAME(self, query):
    """
    Detects if this is a SQL query.
    Args:
        query: input query
    Returns:
        True if this is a valid SQL query, False otherwise
    """
    if isinstance(query, str):
        # Reduce query to a lower-cased single line stripped of leading/trailing whitespace
        query = query.lower().strip(";").replace("\n", " ").replace("\t", " ").strip()
        # Detect if this is a valid txtai SQL statement
        return query.startswith("select ") and (" from txtai " in query or query.endswith(" from txtai"))
    return False