https://kotlinlang.org logo
#getting-started
Title
# getting-started
r

reactormonk

03/08/2024, 11:51 AM
Is there anything like https://github.com/tpolecat/doobie in Kotlin?
s

Sam

03/08/2024, 11:58 AM
r

reactormonk

03/08/2024, 12:13 PM
What makes doobie so nice is that it isn't really an ORM, more of a typecheck layer over raw SQL. It works with prepared statements instead of DAO
a

AdamW

03/08/2024, 12:21 PM
You can use Exposed for its DSL exclusively and avoid the DAO altogether.
1
r

reactormonk

03/08/2024, 12:22 PM
Ah, still Kotlin though. In doobie you'd basically write raw SQL. I guess it'll do.
a

AdamW

03/08/2024, 12:23 PM
There’s also SQLDelight which is worth checking out: https://github.com/cashapp/sqldelight
👍 1
r

reactormonk

03/08/2024, 12:25 PM
That looks interesting. Still going away from raw SQL though 😞
A bit different workflow. Lemme give it a spin. 🤔
u

Ulrich Schuster

03/08/2024, 12:58 PM
g

Goetz Markgraf

03/08/2024, 1:52 PM
I would also suggest to use Exposed. The nice thing about it being a type safe functional SQL client is, that each IDE can add code completions. I prefer that to write SQL statements in a string. We don’t use the DTO layer, just the DSL. Reads a lot like read SQL statements, but in a functional kotlin DSL way.
2 Views