Matej Drobnič
06/18/2020, 3:47 AMwithContext(<http://Dispatchers.IO|Dispatchers.IO>)
? That would look pretty messy.Roger Home-Martinsen
06/18/2020, 6:24 AMMatej Drobnič
06/18/2020, 6:53 AMRobert Jaros
06/18/2020, 6:54 AMMatej Drobnič
06/18/2020, 6:54 AMRobert Jaros
06/18/2020, 6:55 AMRoger Home-Martinsen
06/18/2020, 6:56 AMMatej Drobnič
06/18/2020, 7:13 AMval user = withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
database.getUser()
}
// doSomething with the user
withContext(<http://Dispatchers.IO|Dispatchers.IO>) {
database.saveUser(updatedUser)
}
Roger Home-Martinsen
06/18/2020, 7:16 AMMatej Drobnič
06/18/2020, 7:16 AMyes, but still it's a good alternative to considerI'm not sure how it can be an alternative. ORM and database connector are two completely different things.
thanksforallthefish
06/18/2020, 7:20 AMRobert Jaros
06/18/2020, 8:23 AM