Checkout jooq(1) for a SQL DSL in Java. I've used it with MySQL and love it. Trying to convince my employer for the paid version with RDS.
we use jooq extensively it's probably the most valuable tech in our backend.
Also among various other tech stacks I've never seen something that hits the sweet spot between "plain sql" and "advantages of ORM-stuff" as well as jooq
Re:The Kotlin Foundation
by listenallyall on Saturday February 13, 2021 @03:13PM
(#26126374)
Also, props to the primary developer Lucas, who directly replied to my questions within a day, twice
Re:The Kotlin Foundation
by mirekrusin on Saturday February 13, 2021 @12:55PM
(#26125207)
String templating elevated to "tagged templates" [0] which dispatches template on your own function is suprisingly acceptable solution. I'm using it to drive mssql sql generation [1] and it works really well with type system around combinators. It's perfect, extremely lightweight way to achieve embedded dsl like experience.
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [1] https://github.com/appliedblockchain/tsql
You and the PC probably would be happy with Groovy, specially with them adding a SQL DSL now: https://github.com/apache/groovy/blob/master/subprojects/gro...
Groovy DSLs are much better than Kotlin's.
Gradle, perhaps unfairly, left me not liking Groovy.
We had that in the past, SQLJ
Exposed is a Kotlin SQL library that you might be interested in.
I keep waiting for a good solution for SQL in Java (or another language) that isn't a builder or a string with templating. I don't like what React does architecturally, but JSX shows how mixing languages in an elegant-ish way can be huge.