def primary : String | Nil
#
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 | Nil
- #arbiter_only=(arbiter_only : Bool | Nil)
- #arbiters : Array(String) | Nil
- #arbiters=(arbiters : Array(String) | Nil)
- #cluster_time : Session::ClusterTime | Nil
- #cluster_time=(cluster_time : Session::ClusterTime | Nil)
- #compression : Array(String) | Nil
- #compression=(compression : Array(String) | Nil)
- #connection_id : Int32 | Nil
- #connection_id=(connection_id : Int32 | Nil)
- #election_id : BSON::ObjectId | Nil
- #election_id=(election_id : BSON::ObjectId | Nil)
- #hidden : Bool | Nil
- #hidden=(hidden : Bool | Nil)
-
#hosts : Array(String) | Nil
Replica sets
-
#hosts=(hosts : Array(String) | Nil)
Replica sets
- #ismaster : Bool
- #ismaster=(ismaster : Bool)
- #isreplicaset : Bool | Nil
- #isreplicaset=(isreplicaset : Bool | Nil)
- #last_write : BSON | Nil
- #last_write=(last_write : BSON | Nil)
- #local_time : Time | Int64 | Nil
- #local_time=(local_time : Time | Int64 | Nil)
- #logical_session_timeout_minutes : Int32 | Nil
- #logical_session_timeout_minutes=(logical_session_timeout_minutes : Int32 | Nil)
- #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 | Nil
- #me=(me : String | Nil)
- #min_wire_version : Int32
- #min_wire_version=(min_wire_version : Int32)
-
#msg : String | Nil
Sharded instances
-
#msg=(msg : String | Nil)
Sharded instances
- #ok : Float64
- #ok=(ok : Float64)
- #operation_time : BSON::Timestamp | Nil
- #operation_time=(operation_time : BSON::Timestamp | Nil)
- #passive : Bool | Nil
- #passive=(passive : Bool | Nil)
- #passives : Array(String) | Nil
- #passives=(passives : Array(String) | Nil)
- #primary : String | Nil
- #primary=(primary : String | Nil)
- #read_only : Bool | Nil
- #read_only=(read_only : Bool | Nil)
- #recovery_token : BSON | Nil
- #recovery_token=(recovery_token : BSON | Nil)
- #sasl_supported_mechs : Array(String) | Nil
- #sasl_supported_mechs=(sasl_supported_mechs : Array(String) | Nil)
- #secondary : Bool | Nil
- #secondary=(secondary : Bool | Nil)
- #set_name : String | Nil
- #set_name=(set_name : String | Nil)
- #set_version : Int32 | Nil
- #set_version=(set_version : Int32 | Nil)
- #tags : BSON | Nil
- #tags=(tags : BSON | Nil)
-
#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