class Mongo::Operation::ParallelScan::Result
Defines custom behavior of results in a parallel scan.
@since 2.0.0 @api semiprivate
Constants
- CURSORS
-
The name of the cursors field in the result.
@since 2.0.0 @api private
Public Instance Methods
Source
# File lib/mongo/operation/parallel_scan/result.rb, line 40 def cursor_ids documents.map {|doc| doc[CURSOR][CURSOR_ID]} end
Get all the cursor ids from the result.
@example Get the cursor ids.
result.cursor_ids
@return [ Array<Integer> ] The cursor ids.
@since 2.0.0 @api private
Source
# File lib/mongo/operation/parallel_scan/result.rb, line 53 def documents reply.documents[0][CURSORS] end
Get the documents from parallel scan.
@example Get the documents.
result.documents
@return [ Array<BSON::Document> ] The documents.
@since 2.0.0 @api public
Private Instance Methods
Source
# File lib/mongo/operation/parallel_scan/result.rb, line 59 def first @first ||= reply.documents[0] || {} end