Class: Mongo::Operation::Find::Result
- Inherits:
-
Operation::Result
- Object
- Operation::Result
- Mongo::Operation::Find::Result
- Defined in:
- lib/mongo/operation/find/result.rb
Overview
Defines custom behavior of results in find command.
Instance Method Summary collapse
-
#cursor_id ⇒ Integer
private
Get the cursor id.
-
#documents ⇒ Array<BSON::Document>
Get the documents in the result.
-
#namespace ⇒ String
private
The namespace in which this find command was performed.
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.
34 35 36 |
# File 'lib/mongo/operation/find/result.rb', line 34 def cursor_id cursor_document ? cursor_document[CURSOR_ID] : super end |
#documents ⇒ Array<BSON::Document>
Get the documents in the result.
47 48 49 |
# File 'lib/mongo/operation/find/result.rb', line 47 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.
57 58 59 |
# File 'lib/mongo/operation/find/result.rb', line 57 def namespace cursor_document['ns'] end |