Constructs a WriteConcern from the write concern properties.从写关注属性构造一个WriteConcern。
Optional
w: Wrequest acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.请求确认写入操作已传播到指定数量的mongod
实例或具有指定标记的mongod
实例。
Optional
wtimeoutMS: numberspecify a time limit to prevent write operations from blocking indefinitely指定时间限制以防止写入操作无限期地阻止
Optional
journal: booleanrequest acknowledgment that the write operation has been written to the on-disk journal请求确认写入操作已写入磁盘上的日志
Optional
fsync: boolean | 1equivalent to the j option. Is deprecated and will be removed in the next major version.相当于j选项。已弃用,并将在下一个主要版本中删除。
Optional
fsyncEquivalent to the j option.相当于j选项。
Will be removed in the next major version. Please use journal.将在下一个主要版本中删除。请使用日记账。
Optional
jRequest acknowledgment that the write operation has been written to the on-disk journal.请求确认写入操作已写入磁盘上的日志。
Will be removed in the next major version. Please use journal.将在下一个主要版本中删除。请使用日记账。
Optional
Readonly
journalRequest acknowledgment that the write operation has been written to the on-disk journal请求确认写入操作已写入磁盘上的日志
Optional
Readonly
wRequest acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.请求确认写入操作已传播到指定数量的mongod
实例或具有指定标记的mongod
实例。
Optional
wtimeoutSpecify a time limit to prevent write operations from blocking indefinitely.指定一个时间限制,以防止写入操作无限期地被阻止。
Will be removed in the next major version. Please use wtimeoutMS.将在下一个主要版本中删除。请使用wtimeoutMS。
Optional
Readonly
wtimeoutMSSpecify a time limit to prevent write operations from blocking indefinitely指定时间限制以防止写操作无限期地阻止
Static
applyApply a write concern to a command document. Will modify and return the command.将写入关注应用于命令文档。将修改并返回命令。
Static
fromConstruct a WriteConcern given an options object.在给定选项对象的情况下构造WriteConcern。
Optional
options: W | WriteConcernOptions | WriteConcernOptional
inherit: WriteConcernOptions | WriteConcernGenerated using TypeDoc
A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.一个MongoDB WriteConcern,它描述了MongoDB为写操作请求的确认级别。See
/v7.0/reference/write-concern/