Closed forntoh closed 3 years ago
What about my Issue
defer
was added in a later commit.
you should either switch to newer version or use:
fun <R : Any?> Transaction.Builder<R>.defer(): Deferred<R> {
val deferred = CompletableDeferred<R>()
val transaction = success { _, result -> deferred.complete(result) }
.error { _, throwable -> deferred.completeExceptionally(throwable) }
.build()
deferred.invokeOnCompletion {
if (deferred.isCancelled) {
transaction.cancel()
}
}
transaction.execute()
return deferred
}
DBFlow Version: 5.0.0-alpha1 "com.github.agrosner.dbflow:coroutines:299a76343b"
I am unable to use Kotlin Coroutines in a DAO with DBFlow Transaction
The function
.defer()
can't be found