Interface ClientUpdateResult

interface ClientUpdateResult {
    didUpsert: boolean;
    matchedCount: number;
    modifiedCount: number;
    upsertedId?: any;
}

Properties

didUpsert: boolean

Determines if the upsert did include an _id, which includes the case of the _id being null.

matchedCount: number

The number of documents that matched the filter.

modifiedCount: number

The number of documents that were modified.

upsertedId?: any

The _id field of the upserted document if an upsert occurred.

It MUST be possible to discern between a BSON Null upserted ID value and this field being unset. If necessary, drivers MAY add a didUpsert boolean field to differentiate between these two cases.