Module Mongo::Protocol::Serializers::Sections
In: lib/mongo/protocol/serializers.rb

MongoDB wire protocol serialization strategy for a Section of OP_MSG.

Serializes and de-serializes a list of Sections.

@since 2.5.0

Methods

Classes and Modules

Module Mongo::Protocol::Serializers::Sections::PayloadOne
Module Mongo::Protocol::Serializers::Sections::PayloadZero

Public Class methods

Deserializes a section of an OP_MSG from the IO stream.

@param [ BSON::ByteBuffer ] buffer Buffer containing the sections.

@return [ Array<BSON::Document> ] Deserialized sections.

@since 2.5.0

Serializes the sections of an OP_MSG, payload type 0 or 1.

@param [ BSON::ByteBuffer ] buffer Buffer to receive the serialized Sections. @param [ Array<Hash, BSON::Document> ] value The sections to be serialized. @param [ Fixnum ] max_bson_size The max bson size of documents in the sections. @param [ true, false ] validating_keys Whether to validate document keys.

@return [ BSON::ByteBuffer ] Buffer with serialized value.

@since 2.5.0

Whether there can be a size limit on this type after serialization.

@return [ true ] Documents can be size limited upon serialization.

@since 2.5.0

[Validate]