Anyone got extensive experience with jOOQ and Ktor...
# server
r
Anyone got extensive experience with jOOQ and Ktorm? I like sql dsls rather than ORM frameworks. I’ve used jOOQ for years, but wondering if Ktorm might be a good replacement with better Kotlin DSL features… anyone got a view?
a
Ktorm is great
a
Ktorm is very pleasant to use and a solid choice for relatively simple DB interactions. I say "simple" because the overall breadth of database functionality is somewhat limited, especially compared to jOOQ. Some of the queries you want to write may have database keywords/functions that Ktorm doesn't support. And no code generation -- you skip that step but then you have to define your tables manually. OTOH, jOOQ costs money if you need to connect to Oracle or SQL Server. Both are very good tools.
r
Thanks, that's helpful - we're doing pretty complicated recursive queries with common table expressions, and I was curious whether Ktorm might have better DSL support for them, but sounds like it might not be Ktorm's strength?
k
I would be interested in knowing how Exposed framework compares with Ktorm.
a
Unfortunately Ktorm's DSL doesn't even support basic subqueries, no chance it supports CTEs. Again, not trying to dump on Ktorm, I use it on some projects and enjoy doing so. But you are likely to hit its limits earlier than you'd expect. https://github.com/kotlin-orm/ktorm/issues/364
r
Thanks, that's very helpful!
d
Try #komapper, it's pretty good @Rob Elliot, I tried Ktorm, but I find komapper better so far...
r
Thanks!
r
Did you ever give Komapper a try @Rob Elliot? I'm a long-time jOOQ user as well, and am considering Komapper as a replacement.
r
No, the replies suggested that it wouldn't handle some of our SQL usage that jOOQ does, so I didn't explore further. Sorry, I've misremembered, it was #ktorm that didn't... I can't remember now what I found with #komapper . I just know I stuck with jOOQ!
👍 1
d
It does have support for some subqueries, and the developer is very responsive to good suggestions... he put out a few versions recently to add some nice features... I've tried other frameworks, and #komapper seems very promising!
r
I'm itching to move towards something like komapper, but jOOQ is just so comprehensive, its hard to switch!
d
I just don't like having to connect to a live db.... my db is on k8s and it would be a headache to have to download it all with each change, with #komapper I just create whatever is relevant to my domain and use it's schema creator to make it in our unit tests.
698 Views