Constructs a WriteConcern from the write concern properties.
Optionalw: W
request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.
OptionalwtimeoutMS: number
specify a time limit to prevent write operations from blocking indefinitely
Optionaljournal: boolean
request acknowledgment that the write operation has been written to the on-disk journal
Optionalfsync: boolean | 1
equivalent 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: W | WriteConcernOptions | WriteConcernOptionalinherit: WriteConcernOptions | WriteConcern
A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.
See
/v8.3/reference/write-concern/