struct

Mongo::Commands::CreateIndexes::Result

Inherits Mongo::Commands::Common::Result / BSON::Serializable / Struct / Value / Object

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

cluster_time
cluster_time=(cluster_time : Session::ClusterTime | Nil)
code
Source
code=(code : Int32 | Nil)
Source
created_collection_automatically
Source
created_collection_automatically=(created_collection_automatically : Bool | Nil)
Source
errmsg
Source
errmsg=(errmsg : String | Nil)
Source
note
Source
note=(note : String | Nil)
Source
num_indexes_after
Source
num_indexes_after=(num_indexes_after : Int32 | Nil)
Source
num_indexes_before
Source
num_indexes_before=(num_indexes_before : Int32 | Nil)
Source
ok
ok=(ok : Float64)
operation_time
operation_time=(operation_time : BSON::Timestamp | Nil)
recovery_token
recovery_token=(recovery_token : BSON | Nil)
to_bson(bson = BSON.new)

Converts to a BSON representation.

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