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

MongoDB Wire protocol getMore message.

This is a client request message that is sent to the server in order to retrieve additional documents from a cursor that has already been instantiated.

The operation requires that you specify the database and collection name as well as the cursor id because cursors are scoped to a namespace.

@api semipublic

Methods

new   payload   replyable?  

Classes and Modules

Class Mongo::Protocol::GetMore::Upconverter

Constants

OP_CODE = 2005   The operation code required to specify a getMore message. @return [Fixnum] the operation code.

@since 2.5.0

Attributes

upconverter  [R] 

Public Class methods

Creates a new getMore message

@example Get 15 additional documents from cursor 123 in ‘xgen.users’.

  GetMore.new('xgen', 'users', 15, 123)

@param database [String, Symbol] The database to query. @param collection [String, Symbol] The collection to query. @param number_to_return [Integer] The number of documents to return. @param cursor_id [Integer] The cursor id returned in a reply.

Public Instance methods

Return the event payload for monitoring.

@example Return the event payload.

  message.payload

@return [ BSON::Document ] The event payload.

@since 2.1.0

Get more messages require replies from the database.

@example Does the message require a reply?

  message.replyable?

@return [ true ] Always true for get more.

@since 2.0.0

[Validate]