are there any sample apps that use that Kodein-DB ...
# kodein
j
are there any sample apps that use that Kodein-DB beta?  I'm trying here to pull in to a (multiplatform) project and having some issues....gradle seems to be able to get dependencies but see following
Copy code
+--- org.kodein.db:kodein-db:0.2.0-beta FAILED
\--- org.kodein.db:kodein-db-serializer-kotlinx:0.2.0-beta
I've pushed my changes to pull in the dependencies to following branch https://github.com/joreilly/BikeShare/tree/kodein_db
using following dependencies
Copy code
const val kotlin = "1.4.10"
    const val kotlinCoroutines = "1.3.9-native-mt-2"
    const val ktor = "1.4.1"
    const val kotlinxSerialization = "1.0.0-RC2"

    const val kodein_db = "0.2.0-beta"
r
Not yet! We are working on it. I will take a look at your branch a soon as I can to see what's going on ;)
👍 1
Hi John, seems you are targeting JS, so far Kodein-DB is not compatible with JS target. I Using Kodein-DB in your project would need to manage intermediate source set and provide different implementation for saving / reading data
j
ok, thanks
fwiw the approach I take in https://github.com/joreilly/PeopleInSpace (for SQLDelight) is that all targets except
JS
have driver dependency and use expect/actual then to get driver.....returning null in
JS
case ....and only used then in code that's used by other targets
but core sqldelight dependency is in common
I guess in this case there isn't need for something like the per-platform sqllite driver dependencies that SQLDelight has
r
We have such possibility using a frontend API in common and specifying correct dependencies for native and jvm. But don't know what will happen with JS. Let me think about it 😉
👍 1
j
I commented out JS dependency in this branch and confirmed I can now call kodein-db apis.....have question then on db creation but will ask outside this thread
r
What’s happening on JS when you call persistence function as you do not have any driver?
j
Right now my JS code doesn't call repository apis (that use persistence) but calls remote apis directly....bit of a hack for now
there is actually a sqldelight driver for JS....but needs to be built from source which I have't got around to trying yet
r
Ok. To end up with the thread. At that time, we don’t support JS, even it’s on our long term roadmap. By using indexedDB, but it’s lot of work.
❤️ 1
j
I think I'm going to narrow my focus anyway in these samples to mobile clients....I think that's where most value is
r
yep that also our thoughts 🙂