Class WriteConcern

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

Hierarchy

  • WriteConcern

Constructors

  • 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 wtimeoutMS: number

      specify a time limit to prevent write operations from blocking indefinitely

    • Optional journal: boolean

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

    • Optional fsync: boolean | 1

      equivalent to the j option. Is deprecated and will be removed in the next major version.

    Returns WriteConcern

Properties

fsync?: boolean | 1

Equivalent to the j option.

Deprecated

Will be removed in the next major version. Please use journal.

j?: boolean

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

Deprecated

Will be removed in the next major version. Please use journal.

journal?: 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.

Deprecated

Will be removed in the next major version. Please use wtimeoutMS.

wtimeoutMS?: number

Specify a time limit to prevent write operations from blocking indefinitely

Methods

Generated using TypeDoc