sqlparse
sqlparse copied to clipboard
`DIV` should be Operator
DIV should be treated as Operator, but it isn't.
https://www.w3schools.com/sql/func_mysql_div.asp
This behavior prevents to get_alias with DIV operator.
Actual behavior
>>> sqlparse.parse('col1 DIV 5')[0]._pprint_tree()
|- 0 Identifier 'col1 D...'
| |- 0 Name 'col1'
| |- 1 Whitespace ' '
| `- 2 Identifier 'DIV'
| `- 0 Name 'DIV'
|- 1 Whitespace ' '
`- 2 Integer '5'
Expected behavior
>>> sqlparse.parse('col1 DIV 5')[0]._pprint_tree()
`- 0 Operation 'col1 D...'
|- 0 Identifier 'col1'
| `- 0 Name 'col1'
|- 1 Whitespace ' '
|- 2 Operator 'DIV'
|- 3 Whitespace ' '
`- 4 Integer '5'