From crate/crate#15826
Steps:
- Implement a new ErrorListener that displays the query with the offending token marked both in javascript and python targets.
- Add the Error to every parsed statement. An error could be an object with the following properties:
{
"error": "ParseError",
"original_query": '...",
"original_query_with_offending_token": "...",
"offending_token": "...",
"error_message": "...",
"col": 1,
"line": 1
}
We should be able to disable this by:
sqlparse('SELECT 1;', raise_exception=True)
Missing: Javascript target