Hey!! do you know why in the App Inspection i see ...
# room
e
Hey!! do you know why in the App Inspection i see all my room databases closed?
for iOS:
Copy code
actual fun createTeamLastMatches(): RoomDatabase.Builder<TeamLastMatchesDataBase> {
    val dbFile = documentDirectory() + "/${TeamLastMatchesDataBase.DATABASE_NAME}"
    return Room.databaseBuilder<TeamLastMatchesDataBase>(
        name = dbFile
    )
}
for Android:
Copy code
actual fun createTeamLastMatches(): RoomDatabase.Builder<TeamLastMatchesDataBase> {
    val appContext = context.applicationContext
    val dbFile = appContext.getDatabasePath(TeamLastMatchesDataBase.DATABASE_NAME)
    return Room.databaseBuilder(
        appContext, dbFile.absolutePath
    )
}
Copy code
@Dao
interface TeamLastMatchesDao {

    @Query("SELECT * FROM TeamLastMatchesItem")
    fun fetchTeamLastMatches(): Flow<List<TeamLastMatchesItem>>

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun save(lastMatches: List<TeamLastMatchesItem>)

}
@Database(entities = [TeamLastMatchesItem::class], version = 1)
@TypeConverters(
    StringListTypeConverter::class
)
@ConstructedBy(TeamLastMatchesDatabaseConstructor::class)
abstract class TeamLastMatchesDataBase : RoomDatabase() {

    abstract val teamLastMatchesDao: TeamLastMatchesDao

    companion object {
        const val DATABASE_NAME = "team_last_matches.db"
    }
}