SQL Formatter #3135
Closed
brentonmallen1
started this conversation in
Ideas
SQL Formatter
#3135
Replies: 1 comment 1 reply
-
Right now keywords are generally capitalized by default, so that should be good. I'm not sure what |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was looking to do some query pre-processing/cleaning but wasn't able to figure out how something like that is meant to / could be done here. I'm specifically thinking of something along the lines of sqlparse's format functionality - i.e.
sqlparse.format(first, reindent=True, keyword_case='upper')
to remove things like comments, whitespaces, etc.If I've missed the intended way to do this, please let me know. I think it's valuable to do this before parsing the query into an AST (for speed?), or maybe either have that as a parsing option or as a method on the AST to provide that clean sql with the
.sql
call?Any thoughts or suggestions (if this is out of scope for this tool) would be appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions