Upconverter — Documentation by YARD 0.9.37 (original) (raw)
Class: Mongo::Protocol::Reply::Upconverter
Inherits:
Object
- Object
- Mongo::Protocol::Reply::Upconverter show all
Defined in:
lib/mongo/protocol/reply.rb
Overview
Upconverts legacy replies to new op command replies.
Constant Summarycollapse
NEXT_BATCH =
'nextBatch'.freeze
FIRST_BATCH =
'firstBatch'.freeze
CURSOR =
'cursor'.freeze
ID =
'id'.freeze
Instance Attribute Summary collapse
- #cursor_id ⇒ Integer readonly
Cursor_id The cursor id. - #documents ⇒ ArrayBSON::Document readonly
Documents The documents. - #starting_from ⇒ Integer readonly
Starting_from The starting point in the cursor.
Instance Method Summarycollapse
- #command ⇒ BSON::Document
Get the upconverted command. - #initialize(documents, cursor_id, starting_from) ⇒ Upconverter constructor
Initialize the new upconverter.
Constructor Details
#initialize(documents, cursor_id, starting_from) ⇒ Upconverter
Initialize the new upconverter.
152 153 154 155 156 | # File 'lib/mongo/protocol/reply.rb', line 152 def initialize(documents, cursor_id, starting_from) @documents = documents @cursor_id = cursor_id @starting_from = starting_from end |
---|
Instance Attribute Details
#cursor_id ⇒ Integer
Returns cursor_id The cursor id.
162 163 164 | # File 'lib/mongo/protocol/reply.rb', line 162 def cursor_id @cursor_id end |
---|
#documents ⇒ ArrayBSON::Document
Returns documents The documents.
159 160 161 | # File 'lib/mongo/protocol/reply.rb', line 159 def documents @documents end |
---|
#starting_from ⇒ Integer
Returns starting_from The starting point in the cursor.
165 166 167 | # File 'lib/mongo/protocol/reply.rb', line 165 def starting_from @starting_from end |
---|
Instance Method Details
#command ⇒ BSON::Document
Get the upconverted command.
175 176 177 | # File 'lib/mongo/protocol/reply.rb', line 175 def command command? ? op_command : find_command end |
---|