You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importsqlparsesql="""SELECT * -- commentFROM table WHERE table.id = '123'/* second comment */"""parsed=sqlparse.parse(sql)
statement=parsed[0]
print(statement.tokens[-1])
outputs: instance of Where
WHERE table.id = '123'
/* second comment */
expected output: instance of Comment
/* second comment */
The text was updated successfully, but these errors were encountered:
the21st
changed the title
/*-style comments not parsed as separate, comment tokens/* ... */-style comments not parsed as separate, comment tokens
May 17, 2023
Example:
outputs: instance of
Where
expected output: instance of
Comment
The text was updated successfully, but these errors were encountered: