Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WriteConcern

A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.MongoDB WriteConcern,描述从MongoDB请求的写入操作确认级别。

see

https://docs.mongodb.com/manual/reference/write-concern/

Hierarchy继承层级

  • WriteConcern

Index索引

Constructors构造函数

Properties属性

Methods方法

Constructors构造函数

  • new WriteConcern(w?: W, wtimeout?: number, j?: boolean, fsync?: boolean | 1): WriteConcern
  • Constructs a WriteConcern from the write concern properties.从写关注点属性构造WriteConcern。

    Parameters参数

    • Optional w: W

      request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.请求确认写入操作已传播到指定数量的mongod实例或具有指定标记的mongo实例。

    • Optional wtimeout: number

      specify a time limit to prevent write operations from blocking indefinitely指定时间限制以防止写入操作无限期阻塞

    • Optional j: boolean

      request acknowledgment that the write operation has been written to the on-disk journal请求确认写入操作已写入磁盘日志

    • Optional fsync: boolean | 1

      equivalent to the j option相当于j选项

    Returns 返回 WriteConcern

Properties属性

fsync?: boolean | 1

equivalent to the j option相当于j选项

j?: boolean

request acknowledgment that the write operation has been written to the on-disk journal请求确认写入操作已写入磁盘日志

w?: W

request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.请求确认写入操作已传播到指定数量的mongod实例或具有指定标记的mongo实例。

wtimeout?: number

specify a time limit to prevent write operations from blocking indefinitely指定时间限制以防止写入操作无限期阻塞

Methods方法

Generated using TypeDoc