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

    An error indicating an unsuccessful Bulk Write

    层级 (查看层级一览)

    可索引

    • [key: string]: any
    索引

    构造函数

    属性

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    message: string
    ok?: number
    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    writeErrors: OneOrMore<WriteError>
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    访问器

    • get deletedCount(): number

      Number of documents deleted.

      返回 number

    • get errmsg(): string

      Legacy name for server error responses

      返回 string

    • get errorLabels(): string[]

      返回 string[]

    • get insertedCount(): number

      Number of documents inserted.

      返回 number

    • get insertedIds(): { [key: number]: any }

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

      返回 { [key: number]: any }

    • get matchedCount(): number

      Number of documents matched for update.

      返回 number

    • get modifiedCount(): number

      Number of documents modified.

      返回 number

    • get name(): string

      返回 string

    • get upsertedCount(): number

      Number of documents upserted.

      返回 number

    • get upsertedIds(): { [key: number]: any }

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

      返回 { [key: number]: any }

    方法

    • 参数

      • label: string

      返回 void

    • Checks the error to see if it has an error label

      参数

      • label: string

        The error label to check for

      返回 boolean

      returns true if the error has the provided error label

    • Create .stack property on a target object

      参数

      • targetObject: object
      • 可选constructorOpt: Function

      返回 void