Class Mongo::Protocol::Reply
In: lib/mongo/protocol/reply.rb
Parent: Message

The MongoDB wire protocol message representing a reply

@example

  socket = TCPSocket.new('localhost', 27017)
  query = Protocol::Query.new('xgen', 'users', {:name => 'Tyler'})
  socket.write(query)
  reply = Protocol::Reply::deserialize(socket)

@api semipublic

Methods

Classes and Modules

Class Mongo::Protocol::Reply::Upconverter

Constants

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

@since 2.5.0

FLAGS = [ :cursor_not_found, :query_failure, :shard_config_stale, :await_capable   Available flags for a Reply message.

Public Instance methods

Determine if the reply had a cursor not found flag.

@example Did the reply have a cursor not found flag.

  reply.cursor_not_found?

@return [ true, false ] If the query cursor was not found.

@since 2.2.3

Return the event payload for monitoring.

@example Return the event payload.

  message.payload

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

@since 2.1.0

Determine if the reply had a query failure flag.

@example Did the reply have a query failure.

  reply.query_failure?

@return [ true, false ] If the query failed.

@since 2.0.5

[Validate]