The type of the elements in the cursor.
Returns an iterator for the cursor, allowing it to be used in for...of
loops.
The iterator fetches all the results from the cursor.
An iterator over the fetched results.
Return remaining objects in the cursor as an array. This method exhausts the cursor
Sets the collation options for the cursor. Collation allows users to specify language-specific rules for string comparison, such as case sensitivity and accent marks.
The collation specification to apply.
The current cursor instance for chaining.
Returns the number of objects return in the cursor. This method exhausts the cursor
Applies the provided callback function to each element in the cursor.
A callback function that is invoked for each element in the cursor.
Determines if there are more elements available in the cursor.
true
if there are more elements to iterate over, otherwise false
.
Retrieves the next item in the cursor.
The
Cursor
class provides a mechanism for iterating over a collection of data with support for filtering, projection, sorting, skipping, and limiting results. It is designed to be chainable and supports lazy evaluation for efficient data processing.