struct

Mongo::Commands::Common::WriteConcernError

Inherits BSON::Serializable / Struct / Value / Object

WriteConcernError bson sub-document.

Constructors

new(bson : BSON)

Allocate an instance and copies data from a BSON struct.

class User
  include BSON::Serializable
  property name : String
end

data = BSON.new
data["name"] = "John"
User.new(data)

Class methods

from_bson(bson : BSON)

NOTE: See self.new.

Instance methods

code
Source
code=(code : Int32)
Source
err_info
Source
err_info=(err_info : BSON | Nil)
Source
errmsg
Source
errmsg=(errmsg : String)
Source
to_bson(bson = BSON.new)

Converts to a BSON representation.

user = User.new name: "John"
bson = user.to_bson