Package-level declarations

Types

Link copied to clipboard

Provides a read-only, forward-only, type-safe cursor as Iterator over the result set of underlying database cursor. Helpful to use with Kotlin forEach.

Functions

Link copied to clipboard

Converts the KQLiteCursor into a cold Flow that emits the cursor whenever the underlying database tables are updated.

Link copied to clipboard
fun <T> KQLiteCursor.mapToList(mapper: (KQLiteCursor) -> T): List<T>

Eagerly maps all rows from this KQLiteCursor into a List using mapper.

fun <T> Flow<KQLiteCursor>.mapToList(dispatcher: CoroutineDispatcher? = null, mapper: (KQLiteCursor) -> T): Flow<List<T>>

Maps each emitted KQLiteCursor from the upstream Flow into a List.

Link copied to clipboard
fun <T> KQLiteCursor.mapToSingle(mapper: (KQLiteCursor) -> T): T

Maps the first row of this KQLiteCursor into a single object of type T using mapper.

fun <T> Flow<KQLiteCursor>.mapToSingle(dispatcher: CoroutineDispatcher? = null, mapper: (KQLiteCursor) -> T): Flow<T>

Maps each emitted KQLiteCursor from the upstream Flow into a single object of type T.

Link copied to clipboard

Maps the first row of this KQLiteCursor into an object of type T using mapper, or returns null if the cursor is empty.

fun <T> Flow<KQLiteCursor>.mapToSingleOrNull(dispatcher: CoroutineDispatcher? = null, mapper: (KQLiteCursor) -> T): Flow<T?>

Maps each emitted KQLiteCursor from the upstream Flow into an object of type T or null.