What's the best library for sharing a pre-populate...
# multiplatform
d
What's the best library for sharing a pre-populated sqlite database in Kotlin Multiplatform?
h
SQLDelight?
d
I can't find information about shipping pre-populated sqlite databases with SqlDelight. Can you point to any documentation?
h
The whole discussion has lots of useful information
d
It seems quite complex and it doesn't support desktop or web. Given I have a database with 10000 rows and 5 fields (the sqlite file size is less than 300KB), would it makes sense to create a Kotlin data class with 5 fields, hardcode it as a list of 10000 elements, and querying the data using Kotlin higher functions? Something like:
Copy code
val cities by lazy { listOf(
   City("Paris","FRA",34.5,54.6,true)
   City("London","GBR",33.1,51.3,true)
   City("Berlin","GER",37.4,59.0,true)
   ......
)}
Does anyone have experience hardcoding in Kotlin this amount of data?
h
SQLDelight supports all platforms
d
I mean, pre-populated databases require copying the Sqlite file around. That discussion only talked about Android and iOS. Not sure what's the procedure in Desktop and Web.
👍 1
h
#squarelibraries