primary
SourceMongo::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
Sourcearbiters
Sourcecluster_time
cluster_time=(cluster_time : Session::ClusterTime | Nil)
compression
Sourceconnection_id
Sourceelection_id
Sourceismaster
Sourceisreplicaset
Sourcelast_write
Sourcelocal_time
Sourcelogical_session_timeout_minutes
Sourcemax_bson_object_size
Sourcemax_message_size_bytes
Sourcemax_wire_version
Sourcemax_write_batch_size
Sourceme
Sourcemin_wire_version
Sourceok
ok=(ok : Float64)
operation_time
passive
Sourcepassives
Sourceread_only
Sourcerecovery_token
sasl_supported_mechs
Sourcesecondary
Sourceset_name
Sourceset_version
Sourcetags
Sourceto_bson(bson = BSON.new)
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson