Skip to main content
Extremely Popular
Go to Latest
interface WriteConcern
import { type WriteConcern } from "https://deno.land/x/mongo@v0.31.2/src/types/read_write_concern.ts";

interface for WriteConcern documents used by MongoDB

Properties

w: number | "majority" | string

The number of instances the write operation needs to be propagated to before proceeding.

The string based values are:

  • majority: The calculated majority of nodes in a cluster has accepted the the write
  • custom write name: Writes have been acknowledged by nodes tagged with the custom write concern.
j: boolean

If true, the server only returns after the operation has been commited to disk

optional
wtimeout: number

An optional timeout value after which to stop the write operation