Class MongoBulkWriteError

An error indicating an unsuccessful Bulk Write

Hierarchy

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

codeName?: string
connectionGeneration?: number
message: string
ok?: number
stack?: string
topologyVersion?: TopologyVersion
writeConcernError?: mongoose.mongo.BSON.Document
writeErrors: OneOrMore<WriteError>
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Accessors

  • get deletedCount(): number
  • Number of documents deleted.

    Returns number

  • get errmsg(): string
  • Legacy name for server error responses

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get insertedCount(): number
  • Number of documents inserted.

    Returns number

  • get insertedIds(): {
        [key: number]: any;
    }
  • Inserted document generated Id's, hash key is the index of the originating operation

    Returns {
        [key: number]: any;
    }

    • [key: number]: any
  • get matchedCount(): number
  • Number of documents matched for update.

    Returns number

  • get modifiedCount(): number
  • Number of documents modified.

    Returns number

  • get name(): string
  • Returns string

  • get upsertedCount(): number
  • Number of documents upserted.

    Returns number

  • get upsertedIds(): {
        [key: number]: any;
    }
  • Upserted document generated Id's, hash key is the index of the originating operation

    Returns {
        [key: number]: any;
    }

    • [key: number]: any

Methods

  • Parameters

    • label: string

    Returns void

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

    Parameters

    • label: string

      The error label to check for

    Returns boolean

    returns true if the error has the provided error label

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function
      Optional

    Returns void

Generated using TypeDoc