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://www.mongodb.com/docs/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