Class: Mongo::Protocol::Reply
- Defined in:
- lib/mongo/protocol/reply.rb
Overview
The MongoDB wire protocol message representing a reply
Defined Under Namespace
Classes: Upconverter
Constant Summary
Constants inherited from Message
Message::BATCH_SIZE, Message::COLLECTION, Message::LIMIT, Message::MAX_MESSAGE_SIZE, Message::ORDERED, Message::Q
Constants included from Serializers
Serializers::HEADER_PACK, Serializers::INT32_PACK, Serializers::INT64_PACK, Serializers::NULL, Serializers::ZERO
Instance Attribute Summary
Attributes inherited from Message
Instance Method Summary collapse
-
#cursor_not_found? ⇒ true, false
Determine if the reply had a cursor not found flag.
-
#payload ⇒ BSON::Document
Return the event payload for monitoring.
-
#query_failure? ⇒ true, false
Determine if the reply had a query failure flag.
Methods inherited from Message
#==, deserialize, deserialize_array, deserialize_field, deserialize_header, field, fields, #hash, #initialize, #maybe_add_server_api, #maybe_compress, #maybe_decrypt, #maybe_encrypt, #maybe_inflate, #replyable?, #serialize, #set_request_id
Methods included from Id
Constructor Details
This class inherits a constructor from Mongo::Protocol::Message
Instance Method Details
#cursor_not_found? ⇒ true, false
Determine if the reply had a cursor not found flag.
49 50 51 |
# File 'lib/mongo/protocol/reply.rb', line 49 def cursor_not_found? flags.include?(:cursor_not_found) end |
#payload ⇒ BSON::Document
Return the event payload for monitoring.
61 62 63 64 65 66 |
# File 'lib/mongo/protocol/reply.rb', line 61 def payload BSON::Document.new( reply: upconverter.command, request_id: request_id ) end |
#query_failure? ⇒ true, false
Determine if the reply had a query failure flag.
37 38 39 |
# File 'lib/mongo/protocol/reply.rb', line 37 def query_failure? flags.include?(:query_failure) end |