Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WriteConcern

A MongoDB WriteConcern, which describes the level of acknowledgement requested from MongoDB for write operations.

see

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

Hierarchy层级

  • WriteConcern

Index索引

Constructors构造函数

Properties属性

Methods方法

Constructors构造函数

constructor

  • new WriteConcern(w?: W, wtimeout?: number, j?: boolean, fsync?: boolean | 1): WriteConcern
  • Constructs a WriteConcern from the write concern properties.

    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.

    • 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

    Returns返回WriteConcern

Properties属性

Optional fsync

fsync: boolean | 1

equivalent to the j option

Optional j

j: boolean

request acknowledgment that the write operation has been written to the on-disk journal

Optional w

w: W

request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.

Optional wtimeout

wtimeout: number

specify a time limit to prevent write operations from blocking indefinitely

Methods方法

Static fromOptions

Generated using TypeDoc