struct Mongo::Commands::IsMaster::Result

Included Modules

Defined in:

cryomongo/commands/replication/is_master.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.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 Method Detail

def self.from_bson(bson : BSON) #

NOTE See self.new.


Instance Method Detail

def arbiter_only : Bool? #

def arbiter_only=(arbiter_only : Bool?) #

def arbiters : Array(String)? #

def arbiters=(arbiters : Array(String)?) #

def cluster_time : Session::ClusterTime? #

def cluster_time=(cluster_time : Session::ClusterTime?) #

def compression : Array(String)? #

def compression=(compression : Array(String)?) #

def connection_id : Int32? #

def connection_id=(connection_id : Int32?) #

def election_id : BSON::ObjectId? #

def election_id=(election_id : BSON::ObjectId?) #

def hidden : Bool? #

def hidden=(hidden : Bool?) #

def hosts : Array(String)? #

Replica sets


def hosts=(hosts : Array(String)?) #

Replica sets


def ismaster : Bool #

def ismaster=(ismaster : Bool) #

def isreplicaset : Bool? #

def isreplicaset=(isreplicaset : Bool?) #

def last_write : BSON? #

def last_write=(last_write : BSON?) #

def local_time : Time | Int64 | Nil #

def local_time=(local_time : Time | Int64 | Nil) #

def logical_session_timeout_minutes : Int32? #

def logical_session_timeout_minutes=(logical_session_timeout_minutes : Int32?) #

def max_bson_object_size : Int32 #

def max_bson_object_size=(max_bson_object_size : Int32) #

def max_message_size_bytes : Int32 #

def max_message_size_bytes=(max_message_size_bytes : Int32) #

def max_wire_version : Int32 #

def max_wire_version=(max_wire_version : Int32) #

def max_write_batch_size : Int32 #

def max_write_batch_size=(max_write_batch_size : Int32) #

def me : String? #

def me=(me : String?) #

def min_wire_version : Int32 #

def min_wire_version=(min_wire_version : Int32) #

def msg : String? #

Sharded instances


def msg=(msg : String?) #

Sharded instances


def ok : Float64 #

def ok=(ok : Float64) #

def operation_time : BSON::Timestamp? #

def operation_time=(operation_time : BSON::Timestamp?) #

def passive : Bool? #

def passive=(passive : Bool?) #

def passives : Array(String)? #

def passives=(passives : Array(String)?) #

def primary : String? #

def primary=(primary : String?) #

def read_only : Bool? #

def read_only=(read_only : Bool?) #

def recovery_token : BSON? #

def recovery_token=(recovery_token : BSON?) #

def sasl_supported_mechs : Array(String)? #

def sasl_supported_mechs=(sasl_supported_mechs : Array(String)?) #

def secondary : Bool? #

def secondary=(secondary : Bool?) #

def set_name : String? #

def set_name=(set_name : String?) #

def set_version : Int32? #

def set_version=(set_version : Int32?) #

def tags : BSON? #

def tags=(tags : BSON?) #

def to_bson(bson = BSON.new) #

Converts to a BSON representation.

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