【发布时间】:2019-04-10 10:54:16
【问题描述】:
我想让 Kotlin Coroutnies 从 DAO 中延迟
@Query("select * from gameprocess where cabinId = :cabinId ")
fun getAllGameProccesBiCabin(cabinId :Int) : Deferred<GameProcess>
但是它没有编译(房间不知道如何处理Deffered),但我需要使用'Deffered'中的'wait' 怎么办?
作为另一种选择,我可以使用这篇文章中的扩展功能,但是不知道如何将它集成到 dao 中:
https://codelabs.developers.google.com/codelabs/kotlin-coroutines/index.html?index=..%2F..index#6
【问题讨论】:
-
请发布您遇到的错误。
-
看到但没有帮助
标签: android kotlin android-room