Hacker News new | ask | show | jobs
by oh-4-fucks-sake 1290 days ago
I agree with the sentiment--and with most of your comment--except the assertion that "I don't think it's possible to beat this stack".

I have something similar: Kotlin on the server-side with my SQL DSL generated by jOOQ and Flyway running my schema migrations. I don't have any experience with LINQ--but it looks to be of a similar idea to jOOQ such that you get an autogenerated, injection-safe, type-safe, compile-time-checked SQL DSL.

If you like LINQ, you'd probably really like jOOQ. It's uber-powerful and the only queries that I've not been able to completely write in jOOQ are geo-spatial queries--and even for them, I can use string SQL for just the one where-clause predicate where I need to go off-the-rails--the rest of the query still being standard jOOQ. The thing I like most about it, is that the queries that I write in the DSL are sooo close-to-the-metal of pure SQL--I'm not even context-switching between SQL and jOOQ really. Check it out!

3 comments

Also have to sing praise for Kotlin, flyway, and some type-safe db framework.

I’ve recently been migrating projects from jOOQ to SQLDelight. While not as feature complete, being able to write queries in sql and then generate type safe code has been amazing. My biggest issue with jOOQ has been joins where you lose some null safety and general issues with the generated POJO (which admittedly has improved over time). With SQLDelight, it has felt like the database just fades away when writing Kotlin.

I think parent meant “stack” for every similarly high level, statically typed language. I can vouch for Spring (Data) with JPA. The criteria api is also very great.
jOOQ is not even close to EF LINQ, I worked with both.