def primary : String?
#
struct Mongo::Commands::IsMaster::Result
- Mongo::Commands::IsMaster::Result
- Struct
- Value
- Object
Included Modules
- BSON::Serializable
- Mongo::Commands::Common::Result
Defined in:
cryomongo/commands/replication/is_master.crConstructors
-
.new(bson : BSON)
Allocate an instance and copies data from a BSON struct.
Class Method Summary
-
.from_bson(bson : BSON)
NOTE See
self.new
.
Instance Method Summary
- #arbiter_only : Bool?
- #arbiter_only=(arbiter_only : Bool?)
- #arbiters : Array(String)?
- #arbiters=(arbiters : Array(String)?)
- #cluster_time : Session::ClusterTime?
- #cluster_time=(cluster_time : Session::ClusterTime?)
- #compression : Array(String)?
- #compression=(compression : Array(String)?)
- #connection_id : Int32?
- #connection_id=(connection_id : Int32?)
- #election_id : BSON::ObjectId?
- #election_id=(election_id : BSON::ObjectId?)
- #hidden : Bool?
- #hidden=(hidden : Bool?)
-
#hosts : Array(String)?
Replica sets
-
#hosts=(hosts : Array(String)?)
Replica sets
- #ismaster : Bool
- #ismaster=(ismaster : Bool)
- #isreplicaset : Bool?
- #isreplicaset=(isreplicaset : Bool?)
- #last_write : BSON?
- #last_write=(last_write : BSON?)
- #local_time : Time | Int64 | Nil
- #local_time=(local_time : Time | Int64 | Nil)
- #logical_session_timeout_minutes : Int32?
- #logical_session_timeout_minutes=(logical_session_timeout_minutes : Int32?)
- #max_bson_object_size : Int32
- #max_bson_object_size=(max_bson_object_size : Int32)
- #max_message_size_bytes : Int32
- #max_message_size_bytes=(max_message_size_bytes : Int32)
- #max_wire_version : Int32
- #max_wire_version=(max_wire_version : Int32)
- #max_write_batch_size : Int32
- #max_write_batch_size=(max_write_batch_size : Int32)
- #me : String?
- #me=(me : String?)
- #min_wire_version : Int32
- #min_wire_version=(min_wire_version : Int32)
-
#msg : String?
Sharded instances
-
#msg=(msg : String?)
Sharded instances
- #ok : Float64
- #ok=(ok : Float64)
- #operation_time : BSON::Timestamp?
- #operation_time=(operation_time : BSON::Timestamp?)
- #passive : Bool?
- #passive=(passive : Bool?)
- #passives : Array(String)?
- #passives=(passives : Array(String)?)
- #primary : String?
- #primary=(primary : String?)
- #read_only : Bool?
- #read_only=(read_only : Bool?)
- #recovery_token : BSON?
- #recovery_token=(recovery_token : BSON?)
- #sasl_supported_mechs : Array(String)?
- #sasl_supported_mechs=(sasl_supported_mechs : Array(String)?)
- #secondary : Bool?
- #secondary=(secondary : Bool?)
- #set_name : String?
- #set_name=(set_name : String?)
- #set_version : Int32?
- #set_version=(set_version : Int32?)
- #tags : BSON?
- #tags=(tags : BSON?)
-
#to_bson(bson = BSON.new)
Converts to a BSON representation.
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
Instance Method Detail
def to_bson(bson = BSON.new)
#
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson