We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to parse an SQL query:
do $$ declare content_count int = 10; begin /*comment*/ select 1; end; $$
sqlformat.org parse and highlight it correctly:
But when I try to do it in Python:
import sqlparse def parse(s: str): res = sqlparse.parse(s) print(res[0].tokens) parse(""" do $$ declare content_count int = 10; begin /*comment*/ select 1; end; $$""")
I get :
[<Newline ' ' at 0x7AB1C28A8408>, <Keyword 'do' at 0x7AB1C28A8468>, <Whitespace ' ' at 0x7AB1C28A84C8>, <Literal '$$ dec...' at 0x7AB1C28A8528>]
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to parse an SQL query:
sqlformat.org parse and highlight it correctly:
![image](https://private-user-images.githubusercontent.com/12968820/249828246-f9a04bf9-88c2-42b7-abc3-9439df973c9d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNTc4NTksIm5iZiI6MTcyNjE1NzU1OSwicGF0aCI6Ii8xMjk2ODgyMC8yNDk4MjgyNDYtZjlhMDRiZjktODhjMi00MmI3LWFiYzMtOTQzOWRmOTczYzlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDE2MTIzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5NGFjM2QxM2U0MTViZTBiZTM5MGI2M2ZhYjg4Mzc0MzQ3YjU4N2NiNWMyZTg0YWEyMjdkNTEyYzA1MDc3YzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2JXE_Q-WFIhTKDu3orUThDpI_n8T-H1X_wW5v-dUYsU)
But when I try to do it in Python:
I get :
What am I doing wrong?
The text was updated successfully, but these errors were encountered: