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 | Nil #

[View source]
def arbiter_only=(arbiter_only : Bool | Nil) #

[View source]
def arbiters : Array(String) | Nil #

[View source]
def arbiters=(arbiters : Array(String) | Nil) #

[View source]
def cluster_time : Session::ClusterTime | Nil #

def cluster_time=(cluster_time : Session::ClusterTime | Nil) #

def compression : Array(String) | Nil #

[View source]
def compression=(compression : Array(String) | Nil) #

[View source]
def connection_id : Int32 | Nil #

[View source]
def connection_id=(connection_id : Int32 | Nil) #

[View source]
def election_id : BSON::ObjectId | Nil #

[View source]
def election_id=(election_id : BSON::ObjectId | Nil) #

[View source]
def hidden : Bool | Nil #

[View source]
def hidden=(hidden : Bool | Nil) #

[View source]
def hosts : Array(String) | Nil #

Replica sets


[View source]
def hosts=(hosts : Array(String) | Nil) #

Replica sets


[View source]
def ismaster : Bool #

[View source]
def ismaster=(ismaster : Bool) #

[View source]
def isreplicaset : Bool | Nil #

[View source]
def isreplicaset=(isreplicaset : Bool | Nil) #

[View source]
def last_write : BSON | Nil #

[View source]
def last_write=(last_write : BSON | Nil) #

[View source]
def local_time : Time | Int64 | Nil #

[View source]
def local_time=(local_time : Time | Int64 | Nil) #

[View source]
def logical_session_timeout_minutes : Int32 | Nil #

[View source]
def logical_session_timeout_minutes=(logical_session_timeout_minutes : Int32 | Nil) #

[View source]
def max_bson_object_size : Int32 #

[View source]
def max_bson_object_size=(max_bson_object_size : Int32) #

[View source]
def max_message_size_bytes : Int32 #

[View source]
def max_message_size_bytes=(max_message_size_bytes : Int32) #

[View source]
def max_wire_version : Int32 #

[View source]
def max_wire_version=(max_wire_version : Int32) #

[View source]
def max_write_batch_size : Int32 #

[View source]
def max_write_batch_size=(max_write_batch_size : Int32) #

[View source]
def me : String | Nil #

[View source]
def me=(me : String | Nil) #

[View source]
def min_wire_version : Int32 #

[View source]
def min_wire_version=(min_wire_version : Int32) #

[View source]
def msg : String | Nil #

Sharded instances


[View source]
def msg=(msg : String | Nil) #

Sharded instances


[View source]
def ok : Float64 #

def ok=(ok : Float64) #

def operation_time : BSON::Timestamp | Nil #

def operation_time=(operation_time : BSON::Timestamp | Nil) #

def passive : Bool | Nil #

[View source]
def passive=(passive : Bool | Nil) #

[View source]
def passives : Array(String) | Nil #

[View source]
def passives=(passives : Array(String) | Nil) #

[View source]
def primary : String | Nil #

[View source]
def primary=(primary : String | Nil) #

[View source]
def read_only : Bool | Nil #

[View source]
def read_only=(read_only : Bool | Nil) #

[View source]
def recovery_token : BSON | Nil #

def recovery_token=(recovery_token : BSON | Nil) #

def sasl_supported_mechs : Array(String) | Nil #

[View source]
def sasl_supported_mechs=(sasl_supported_mechs : Array(String) | Nil) #

[View source]
def secondary : Bool | Nil #

[View source]
def secondary=(secondary : Bool | Nil) #

[View source]
def set_name : String | Nil #

[View source]
def set_name=(set_name : String | Nil) #

[View source]
def set_version : Int32 | Nil #

[View source]
def set_version=(set_version : Int32 | Nil) #

[View source]
def tags : BSON | Nil #

[View source]
def tags=(tags : BSON | Nil) #

[View source]
def to_bson(bson = BSON.new) #

Converts to a BSON representation.

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