简体   繁体   中英

kotlin flow call list item details async

let us say I have //roomdb

@Query("SELECT * FROM Dog")
fun getAllDogs(): Flow<List<Dog>>

// getDogDetails

suspend fun getDogDetils(id:Int) :DogDetails

I want to hit endpoint to get dog details, however room,sqldelight return Flow<List> as Oneshot, I want to call getDogDetils for all dogs async and return the result as Flow<List<DogDetails>>

It would be easy if you share more details about entity of Dog or schema of your table

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM