Class BulkWriteResult

The result of a bulk write.

Hierarchy

  • BulkWriteResult

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: BulkResult
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

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

  • Returns the number of write errors off the bulk operation

    Returns number

  • Returns true if the bulk operation contains a write error

    Returns boolean

  • Parameters

    Returns {
        [key: number]: any;
    }

    • [key: number]: any

Generated using TypeDoc