@staticmethod<EOL><INDENT>def validate_query(query):<DEDENT>
tokens = _quote_re.findall(query)<EOL>for token in tokens:<EOL><INDENT>if token.startswith('<STR_LIT:">') and token.endswith('<STR_LIT:">'):<EOL><INDENT>continue<EOL><DEDENT>if set(token) & _invalid_ascii:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Simple helper function to indicate whether a search query is a
valid FTS5 query. Note: this simply looks at the characters being
used, and is not guaranteed to catch all problematic queries.