List Queries
(select from MyTable::class
where ...) // some conditions
.flowQueryList(database).use { list ->
// list is just backed by an active cursor.
}
(select from MyTable::class
where ...) // some conditions
.cursorList().use { list ->
// ensure you close these when done, as they utilize active cursors :)
// can use the list like a regular List
for (model in list) {
}
list.forEach { printLn("$it") }
}FlowCursorList
Flow Query List
Last updated
Was this helpful?