Class Mongo::Protocol::GetMore::Upconverter
In: lib/mongo/protocol/get_more.rb
Parent: Object

Converts legacy getMore messages to the appropriare OP_COMMAND style message.

@since 2.1.0

Methods

command   new  

Constants

GET_MORE = 'getMore'.freeze   The get more constant.

@since 2.2.0

Attributes

collection  [R]  @return [ String ] collection The name of the collection.
cursor_id  [R]  @return [ Integer ] cursor_id The cursor id.
number_to_return  [R]  @return [ Integer ] number_to_return The number of docs to return.

Public Class methods

Instantiate the upconverter.

@example Instantiate the upconverter.

  Upconverter.new('users', 1, 1)

@param [ String ] collection The name of the collection. @param [ Integer ] cursor_id The cursor id. @param [ Integer ] number_to_return The number of documents to

  return.

@since 2.1.0

Public Instance methods

Get the upconverted command.

@example Get the command.

  upconverter.command

@return [ BSON::Document ] The upconverted command.

@since 2.1.0

[Validate]