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

  • 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

fsync?: boolean | 1

equivalent to the j option

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.

wtimeout?: number

specify a time limit to prevent write operations from blocking indefinitely

Methods

Generated using TypeDoc