cursorToList function
Convert an autoAdvance openCursor stream to a list
Implementation
Future<List<CursorRow>> cursorToList(Stream<CursorWithValue> stream,
[int? offset, int? limit]) =>
_autoCursorStreamToList(
stream,
(cwv) => CursorRow(cwv.key, cwv.primaryKey, cloneValue(cwv.value)),
offset,
limit);