`mapper = ::CountryData`?
# squarelibraries
j
mapper = ::CountryData
?
d
thanks! it seems to work
any way to simplify this? probably not
Copy code
fun LocalDb.setCountriesList(list : List<CountryListData>) {
    countriesQueries.transaction {
        list.forEach {
            countriesQueries.updateCountry(
                name = it.name,
                population = it.population,
                first_doses = it.firstDoses,
                fully_vaccinated = it.fullyVaccinated,
            )
        }
    }
}
where
Copy code
updateCountry:
INSERT OR REPLACE INTO Countries(name,population,first_doses,fully_vaccinated)
VALUES(?,?,?,?);