scan

fun scan(from: Key? = null, to: Key? = null, snapshot: Snapshot? = null): DocumentCursor

An ordered walk over the documents in [from, to], both bounds inclusive and both optional.

Without a snapshot the cursor takes one of its own and closes it with itself, so a scan is consistent whether or not the caller asked for that. Deleted keys produce nothing, and a key appears once however many times it has been written.