Earlier quoted context omitted.
I never understood why people want to uppercase anything. It's like source code from 1970, when even bold highlight was something unavailable and developers used uppercase for keywords. I don't uppercase SQL, I prefer software which does proper highlighting.
In the beginning, there was uppercase
Sqlfmt: an opinionated online SQL formatter
71–80 of 94 posts
Re: Sqlfmt: an opinionated online SQL formatter
#72Earlier quoted context omitted.
Consider those of us stuck with Java adapters to Postgres, which means Postgres syntax but ? for placeholders.
Is that a thing? The Java driver must actually parse those and convert them. Java is crazy. https://github.com/mjibson/sqlfmt/issues/25 is the issue to track '?' as placeholders.
Re: Sqlfmt: an opinionated online SQL formatter
#73Looks really cool, but I have one suggestion. Have you considered using leading commas? It makes big SQL statements much easier to edit and it improves diffs. I normally use trailing commas for my code, but most sql dialects don't support it so I fallback to leading ones there.
Funny because I was reading other people's comments and thinking "wow, that person is VERY opinionated on query formatting" (but now here I am).
Re: Sqlfmt: an opinionated online SQL formatter
#74Tangentially 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
#75Why all the SCREAMING? Is something wrong? It's 2018, we aren't using teletypes with bad shift keys and we all have syntax coloring IDEs, we don't need to scream out all our KEYWORDS like we were still writing COBOL or FORTRAN in the 1960s. It's become my biggest pet peeve with most SQL formatters. I think sentence cased SQL is far more readable. Select * from sometable where SomeColumn > 3 But I realize I'm a minori…
(HEY '(DONT FORGET LISP!))Re: Sqlfmt: an opinionated online SQL formatter
#76Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
sqlfmt is inspired by the style of gofmt ( https://blog.golang.org/go-fmt-your-code ). The reason a tool having an opinion about formatting is useful is that it removes humans from having to care about formatting. I didn't like how gofmt formatted my Go code at first. But since I couldn't care, I didn't care, and now I never care about formatting. Without an opinion, we spend lots of time quibbling about stuff that d…
One thing I learned somewhat recently as well is that within google3, these automatic formatters come in super handy when doing large-scale changes, e.g. when a library is deprecated and the maintainers are moving all the clients to the new one.
Re: Sqlfmt: an opinionated online SQL formatter
#77Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
Re: Sqlfmt: an opinionated online SQL formatter
#78Re: Sqlfmt: an opinionated online SQL formatter
#79I'm sad this isn't available as a binary, it's not much use to me as a website.
I searched around and found https://github.com/jackc/sqlfmt , which is an older open source project also called sqlfmt, also written in Go. I don't know anything about how they compare.
Re: Sqlfmt: an opinionated online SQL formatter
#80I would love to package this (most likely from https://github.com/lopezator/sqlfmt ) for my package manager of choice. What is the license?