Hey, guys, how do you write your SQL? Because I really cannot be bothered with the uppercase tradition and underscores. My SQL queries are lowercase and aliases camelCase. What's your take?
1️⃣ Wtf, I hate when people do that. SQL must be all caps
2️⃣ I don't care
3️⃣ I also cannot be bothered with the allcaps
1️⃣ 9
3️⃣ 1
2️⃣ 12
f
Frank Bouwens
06/02/2025, 2:07 PM
We don’t have to write a lot of SQL anymore.
We just let some library handle that.
https://www.jetbrains.com/exposed/
For the little bit of SQL that’s left, it’s whatever.
👍 1
h
hho
06/02/2025, 3:34 PM
jOOQ writes most SQL for me.
I basically only write Flyway scripts myself, and for those, there's auto-format in IntelliJ IDEA.
➕ 1
g
gildor
06/03/2025, 10:39 AM
My take is that writing SQL is great, as soon as you use relational DB, doesn't matter caps lock or lowercase, it's just better than use ORMs.
Though, I prefer upper case style
k
Klitos Kyriacou
06/03/2025, 12:43 PM
I usually use jOOQ, but I don't mind writing SQL, and I find it just as readable as any jOOQ expression. When I write SQL - in fact, when I write in any language - I use whatever is the team's guidelines or the most common style, even if I don't like it myself (for example, I always use 4 spaces for indents in Java and Kotlin even though I 'know' tabs are better™).