https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

Dennis L

04/10/2019, 7:00 PM
Is there any pure Kotlin Multiplatform DB/ORM libraries besides sqldelight? Something involving writing less SQL statements, I'm guessing it's the only one for now?
k

kpgalligan

04/10/2019, 7:15 PM
That is the only one
g

gildor

04/11/2019, 5:52 AM
Why do you need this? I never understand problem that solved by some builder/dsl for SQL requests
t

thevery

04/11/2019, 8:49 AM
sqldelight is not quite builder, but rather mapping and database provider, that is much more useful imo
g

gildor

04/11/2019, 8:51 AM
@thevery Yes, I completely agree, I meant that sqldelight has much better approach imo that all those ORMs that try to hide SQL from you by horrible SQL request builder which is what Fhyber looking for
t

thevery

04/11/2019, 9:06 AM
Lightweight builds like https://github.com/pushtorefresh/storio/blob/master/README.md are actually useful
g

gildor

04/11/2019, 9:08 AM
But why?
I mean, yeah, it may be useful to pass arguments, better to just concatenate, but sqldelight also does this
t

thevery

04/11/2019, 9:24 AM
Updating 3 fields in 10 fields entity without a builder is really painful, you have to write a lot of separate sql queries
k

kpgalligan

04/11/2019, 11:40 AM
I think ORMs can be useful but I prefer sqldelight and would use that over Room, etc, if I was just doing Android (which seems an unlikely problem in the near future). “try to hide SQL from you by horrible SQL request builder” Anything that’s trying to hide SQL does kind of miss the point. However, in defense of ORMs, it was always the data mapping and relations that I found useful. The query builders are generally bad.
42 Views