Hey, guys, how do you write your SQL? Because I re...
# random
o
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️⃣ 8
3️⃣ 1
2️⃣ 12
f
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
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
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
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™).
1
🧌 1