| Module | Mongo::Collection::View::Iterable |
| In: |
lib/mongo/collection/view/iterable.rb
|
Defines iteration related behavior for collection views, including cursor instantiation.
@since 2.0.0
Stop the iteration by sending a KillCursors command to the server.
@example Stop the iteration.
view.close_query
@since 2.1.0
Iterate through documents returned by a query with this View.
@example Iterate through the result of the view.
view.each do |document|
p document
end
@return [ Enumerator ] The enumerator.
@since 2.0.0
@yieldparam [ Hash ] Each matching document.