Constructs a WriteConcern from the write concern properties.
Optionalw: Wrequest acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.
OptionalwtimeoutMS: numberspecify a time limit to prevent write operations from blocking indefinitely
Optionaljournal: booleanrequest acknowledgment that the write operation has been written to the on-disk journal
Optionalfsync: boolean | 1equivalent to the j option. Is deprecated and will be removed in the next major version.
OptionalfsyncEquivalent to the j option.
OptionaljRequest acknowledgment that the write operation has been written to the on-disk journal.
Optional ReadonlyjournalRequest acknowledgment that the write operation has been written to the on-disk journal
Optional ReadonlywRequest acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags. If w is 0 and is set on a write operation, the server will not send a response.
OptionalwtimeoutSpecify a time limit to prevent write operations from blocking indefinitely.
Optional ReadonlywtimeoutMSSpecify a time limit to prevent write operations from blocking indefinitely.
StaticapplyApply a write concern to a command document. Will modify and return the command.
StaticfromConstruct a WriteConcern given an options object.
Optionaloptions: WriteConcernOptions | W | WriteConcernOptionalinherit: WriteConcernOptions | WriteConcern
A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.
See
https://www.mongodb.com/docs/manual/reference/write-concern/