Skip to content

Add verbose options to both python and javascript target to include query and approximate position of the error. #2

@surister

Description

@surister

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestjavascriptAbout the Javascript packagepythonAbout the Python package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions