#521 - Add example for Kotlin Coroutines and Flow support.
Original pull request: #522.
This commit is contained in:
committed by
Mark Paluch
parent
9080685591
commit
4f0b76ee5d
@@ -63,3 +63,16 @@ Using the `Criteria` extensions allows to write type-safe queries via an ideomat
|
||||
operations.find<Person>(Query(Person::firstname isEqualTo "Tyrion"))
|
||||
```
|
||||
|
||||
## Coroutines and Flow support
|
||||
|
||||
```kotlin
|
||||
runBlocking {
|
||||
operations.find<Person>(Query(where("firstname").isEqualTo("Tyrion"))).awaitSingle()
|
||||
}
|
||||
```
|
||||
|
||||
```kotlin
|
||||
runBlocking {
|
||||
operations.findAll<Person>().asFlow().toList()
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user