Mongo Cursor
The Mongo Cursor interface implementing the iterator protocol.
An application should ensure that a cursor is closed in all circumstances, e.g. using a use
statement:
collection.find().cursor().use { c ->
while (c.hasNext()) {
println(c.next())
}
}
Content copied to clipboard
Parameters
T
The type of documents the cursor contains