openKeyCursor
suspend fun Queryable.openKeyCursor(query: Key? = null, direction: Cursor.Direction = Cursor.Direction.Next, cursorStart: CursorStart? = null, autoContinue: Boolean): Flow<Cursor>
When autoContinue is true
, all values matching the query will emit automatically. It is important not to suspend in flow collection on anything other than flow operators (such as .toList
).
Warning: when autoContinue is false
, callers are responsible for data flow and must call continue
, advance
, or similar explicitly. The returned flow will terminate automatically after continue
if no more elements remain. Otherwise, you must call close
to terminate the flow. Failing to call continue
or close
will result in the flow stalling.
suspend fun Queryable.openKeyCursor(query: Key? = null, direction: Cursor.Direction = Cursor.Direction.Next, cursorStart: CursorStart? = null): Flow<Cursor>
Deprecated
In the future, `autoContinue` will be a required parameter.
Replace with
openKeyCursor(query, direction, cursorStart, autoContinue = true)
Content copied to clipboard