Mongo::WriteConcern
Inherits BSON::Serializable / Struct / Value / Object
Write concern describes the level of acknowledgment requested from MongoDB for write operations to a standalone mongod or to replica sets or to sharded clusters.
In sharded clusters, mongos instances will pass the write concern on to the shards.
Constructors
Class methods
Instance methods
The j option requests acknowledgment from MongoDB that the write operation has been written to the on-disk journal.
The j option requests acknowledgment from MongoDB that the write operation has been written to the on-disk journal.
Converts to a BSON representation.
user = User.new name: "John"
bson = user.to_bson
The w option requests acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.
The w option requests acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.
This option specifies a time limit, in milliseconds, for the write concern. wtimeout is only applicable for w values greater than 1.