API 参考
    正在准备搜索索引...

    The result of a bulk write.

    索引

    构造函数

    属性

    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

    matchedCount: number

    Number of documents matched for update.

    modifiedCount: number

    Number of documents modified.

    upsertedCount: number

    Number of documents upserted.

    upsertedIds: { [key: number]: any }

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

    访问器

    • get nInserted(): number

      The number of inserted documents

      返回 number

    • get nMatched(): number

      Number of matched documents

      返回 number

    • get nModified(): number

      Number of documents updated physically on disk

      返回 number

    • get nRemoved(): number

      Number of removed documents

      返回 number

    • get nUpserted(): number

      Number of upserted documents

      返回 number

    • get ok(): number

      Evaluates to true if the bulk operation correctly executes

      返回 number

    方法

    • Returns an array of all inserted ids

      返回 Document[]

    • Returns raw internal result

      返回 Document

    • Returns the upserted id at the given index

      参数

      • index: number

      返回 undefined | Document

    • Returns an array of all upserted ids

      返回 Document[]

    • Retrieve the write concern error if one exists

      返回 undefined | WriteConcernError

    • Returns a specific write error object

      参数

      • index: number

      返回 undefined | WriteError

    • Returns the number of write errors off the bulk operation

      返回 number

    • Retrieve all write errors

      返回 WriteError[]

    • Returns true if the bulk operation contains a write error

      返回 boolean

    • 返回 boolean

    • 返回 string