Hey, Can I get an answer please to whether the dat...
# multiplatform
n
Hey, Can I get an answer please to whether the database created by sqlDelight is not suppose to persist changes made due to the fact that the database is created using the platform specific SQL drivers. If that’s true is there a way to persist the changes to be seen by more than one platform?
k
Sqldelight changes are persistent to the platform you're on. Your question is confusing, though. Do you have some code to better explain the issue?
n
Ahh I see, Well I’m trying to do it so that both iOS and Android use the same db. If I make a change on Android that change should be reflected on iOS (and vice versa)
eg
Copy code
init {
        GlobalScope.launch(ApplicationDispatcher) {
            if(getNotes().isEmpty()){
                fetchAndStoreNotes()
            }
        }
    }
If ran once on Android shouldn’t return empty on iOS. Ignore that I’m using global scope trying to just do a POC
I’m assuming due to how sqldelight creates two versions for the two separate platforms this would not be possible
k
Sqlite is local to whatever device you're on. That's not a multiplatform thing
n
Ahh! Suspected as much
Thank you