Tangentially related. I'm of the opinion that SQL shouldn't be uppercased. I don't want to hit shift or caps lock and I find lowercase easier to read. Are there others out there like me? I assume I'm in the minority, but I don't understand why. People stopped uppercasing HTML tags, why can't we do the same with SQL?
Sqlfmt: an opinionated online SQL formatter
41–50 of 94 posts
Re: Sqlfmt: an opinionated online SQL formatter
#42Author here. Based on feedback I am going to make a sqlfmt binary for easy editor integration. You can currently already do this by using the CockroachDB binary ( https://www.cockroachlabs.com/docs/releases/v2.1.0-beta.2018... ) but understandably people want a more minimal solution.
1. It lowercases table and field names, rendering the formatted statement useless for a project with not exclusively lowercased names. Could you please fix this?
2. I'd appreciate accepting common placeholder "?" as a valid part of the SQL statement so that we can format queries with placeholders. Would that be possible?
Re: Sqlfmt: an opinionated online SQL formatter
#43Author here. Based on feedback I am going to make a sqlfmt binary for easy editor integration. You can currently already do this by using the CockroachDB binary ( https://www.cockroachlabs.com/docs/releases/v2.1.0-beta.2018... ) but understandably people want a more minimal solution.
Hey, thank you for the formatter! I really like the way it formats statements. Although I have found two issues: 1. It lowercases table and field names, rendering the formatted statement useless for a project with not exclusively lowercased names. Could you please fix this? 2. I'd appreciate accepting common placeholder "?" as a valid part of the SQL statement so that we can format queries with placeholders. Would th…
sqlfmt is not super useful for non-postgres grammars.
Re: Sqlfmt: an opinionated online SQL formatter
#44or
http://www.dpriver.com/pp/sqlformat.htm
both of which seem to give nicer output and handle more diverse sql without erroring.
also not really sure why it considers itself "opinionated"
Re: Sqlfmt: an opinionated online SQL formatter
#45Tangentially related. I'm of the opinion that SQL shouldn't be uppercased. I don't want to hit shift or caps lock and I find lowercase easier to read. Are there others out there like me? I assume I'm in the minority, but I don't understand why. People stopped uppercasing HTML tags, why can't we do the same with SQL?
Re: Sqlfmt: an opinionated online SQL formatter
#46Tangentially related. I'm of the opinion that SQL shouldn't be uppercased. I don't want to hit shift or caps lock and I find lowercase easier to read. Are there others out there like me? I assume I'm in the minority, but I don't understand why. People stopped uppercasing HTML tags, why can't we do the same with SQL?
Just use syntax highlighting, which can make it unambiguous what's a keyword vs func vs name.
Re: Sqlfmt: an opinionated online SQL formatter
#47Re: Sqlfmt: an opinionated online SQL formatter
#48The problem with opinions is everyone has a different one. I like https://www.sqlinform.com/ - keep a copy of notepad around just so I can use it. Wish there was a VSCode extension. The free version was good enough for my needs, but it's so handy I upgraded to the pro version just to show appreciation. The best part is the ability to really customize the layout and save the settings. It's always step #1 when someone…
Web site is kind of horrible.
Re: Sqlfmt: an opinionated online SQL formatter
#49Tangentially related. I'm of the opinion that SQL shouldn't be uppercased. I don't want to hit shift or caps lock and I find lowercase easier to read. Are there others out there like me? I assume I'm in the minority, but I don't understand why. People stopped uppercasing HTML tags, why can't we do the same with SQL?