The result of a bulk write.

Hierarchy

  • BulkWriteResult

Constructors

Properties

deletedCount: number

Number of documents deleted.

insertedCount: number

Number of documents inserted.

insertedIds: {
    [key: number]: any;
}

Inserted document generated Id's, hash key is the index of the originating operation

Type declaration

  • [key: number]: any
matchedCount: number

Number of documents matched for update.

modifiedCount: number

Number of documents modified.

result: any
upsertedCount: number

Number of documents upserted.

upsertedIds: {
    [key: number]: any;
}

Upserted document generated Id's, hash key is the index of the originating operation

Type declaration

  • [key: number]: any
generateIdMap: any

Accessors

  • get nInserted(): number
  • The number of inserted documents

    Returns number

    Deprecated

    Use insertedCount instead.

  • get nMatched(): number
  • Number of matched documents

    Returns number

    Deprecated

    Use matchedCount instead.

  • get nModified(): number
  • Number of documents updated physically on disk

    Returns number

    Deprecated

    Use modifiedCount instead.

  • get nRemoved(): number
  • Number of removed documents

    Returns number

    Deprecated

    Use deletedCount instead.

  • get nUpserted(): number
  • Number of upserted documents

    Returns number

    Deprecated

    User upsertedCount instead.

  • get ok(): number
  • Evaluates to true if the bulk operation correctly executes

    Returns number

Methods

  • Retrieve the write concern error if one exists

    Returns WriteConcernError

  • Returns a specific write error object

    Parameters

    • index: number

    Returns WriteError

  • Returns the number of write errors off the bulk operation

    Returns number

  • Retrieve all write errors

    Returns WriteError[]

  • Returns true if the bulk operation contains a write error

    Returns boolean

  • Returns boolean

  • Returns string

Generated using TypeDoc