struct

Mongo::Commands::IsMaster::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

arbiter_only
Source
arbiter_only=(arbiter_only : Bool | Nil)
Source
arbiters
Source
arbiters=(arbiters : Array(String) | Nil)
Source
cluster_time
cluster_time=(cluster_time : Session::ClusterTime | Nil)
compression
Source
compression=(compression : Array(String) | Nil)
Source
connection_id
Source
connection_id=(connection_id : Int32 | Nil)
Source
election_id
Source
election_id=(election_id : BSON::ObjectId | Nil)
Source
hidden
Source
hidden=(hidden : Bool | Nil)
Source
hosts

Replica sets

Source
hosts=(hosts : Array(String) | Nil)

Replica sets

Source
ismaster
Source
ismaster=(ismaster : Bool)
Source
isreplicaset
Source
isreplicaset=(isreplicaset : Bool | Nil)
Source
last_write
Source
last_write=(last_write : BSON | Nil)
Source
local_time
Source
local_time=(local_time : Time | Int64 | Nil)
Source
logical_session_timeout_minutes
Source
logical_session_timeout_minutes=(logical_session_timeout_minutes : Int32 | Nil)
Source
max_bson_object_size
Source
max_bson_object_size=(max_bson_object_size : Int32)
Source
max_message_size_bytes
Source
max_message_size_bytes=(max_message_size_bytes : Int32)
Source
max_wire_version
Source
max_wire_version=(max_wire_version : Int32)
Source
max_write_batch_size
Source
max_write_batch_size=(max_write_batch_size : Int32)
Source
me=(me : String | Nil)
Source
min_wire_version
Source
min_wire_version=(min_wire_version : Int32)
Source
msg

Sharded instances

Source
msg=(msg : String | Nil)

Sharded instances

Source
ok
ok=(ok : Float64)
operation_time
operation_time=(operation_time : BSON::Timestamp | Nil)
passive
Source
passive=(passive : Bool | Nil)
Source
passives
Source
passives=(passives : Array(String) | Nil)
Source
primary
Source
primary=(primary : String | Nil)
Source
read_only
Source
read_only=(read_only : Bool | Nil)
Source
recovery_token
recovery_token=(recovery_token : BSON | Nil)
sasl_supported_mechs
Source
sasl_supported_mechs=(sasl_supported_mechs : Array(String) | Nil)
Source
secondary
Source
secondary=(secondary : Bool | Nil)
Source
set_name
Source
set_name=(set_name : String | Nil)
Source
set_version
Source
set_version=(set_version : Int32 | Nil)
Source
tags
Source
tags=(tags : BSON | Nil)
Source
to_bson(bson = BSON.new)

Converts to a BSON representation.

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