Constructs a WriteConcern from the write concern properties.从WriteConcern属性构造WriteConcern。
Optionalw: W
request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.请求确认写入操作已传播到指定数量的mongod实例或具有指定标签的mongode实例。
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.相当于j选项。已弃用,将在下一个主要版本中删除。
OptionalfsyncEquivalent to the j option.相当于j选项。
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.请求确认写入操作已传播到指定数量的mongod实例或具有指定标签的mongode实例。如果w为0并且在写操作中设置,则服务器将不会发送响应。
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.在给定options对象的情况下构造WriteConcern。
Optionaloptions: W | WriteConcernOptions | WriteConcernOptionalinherit: WriteConcernOptions | WriteConcern
A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.MongoDB WriteConcern,描述了MongoDB为写操作请求的确认级别。See
/v8.3/reference/write-concern/