Result — Documentation by YARD 0.9.37 (original) (raw)
Class: Mongo::Operation::Find::Result
Inherits:
Defined in:
lib/mongo/operation/find/result.rb
Overview
Defines custom behavior of results in find command.
Constant Summary
Constants inherited from Result
Result::CURSOR, Result::CURSOR_ID, Result::FIRST_BATCH, Result::N, Result::NAMESPACE, Result::NEXT_BATCH, Result::OK, Result::RESULT
Instance Attribute Summary
Attributes inherited from Result
#connection, #connection_description, #connection_global_id, #context, #replies
Instance Method Summarycollapse
- #cursor_id ⇒ Integer private
Get the cursor id. - #documents ⇒ ArrayBSON::Document
Get the documents in the result. - #namespace ⇒ String private
The namespace in which this find command was performed.
Methods inherited from Result
#acknowledged?, #cluster_time, #each, #error, #has_cursor_id?, #initialize, #inspect, #labels, #ok?, #operation_time, #reply, #returned_count, #snapshot_timestamp, #successful?, #topology_version, #validate!, #write_concern_error?, #written_count
Instance Method Details
#cursor_id ⇒ Integer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get the cursor id.
37 38 39 | # File 'lib/mongo/operation/find/result.rb', line 37 def cursor_id cursor_document ? cursor_document[CURSOR_ID] : super end |
---|
#documents ⇒ ArrayBSON::Document
Get the documents in the result.
50 51 52 | # File 'lib/mongo/operation/find/result.rb', line 50 def documents cursor_document[FIRST_BATCH] end |
---|
#namespace ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The namespace in which this find command was performed.
60 61 62 | # File 'lib/mongo/operation/find/result.rb', line 60 def namespace cursor_document['ns'] end |
---|