Interface UpdateResult<TSchema>

TSchema is the schema of the collection

interface UpdateResult<TSchema> {
    acknowledged: boolean;
    matchedCount: number;
    modifiedCount: number;
    upsertedCount: number;
    upsertedId: null | InferIdType<TSchema>;
}

Type Parameters

Properties

acknowledged: boolean

Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined

matchedCount: number

The number of documents that matched the filter

modifiedCount: number

The number of documents that were modified

upsertedCount: number

The number of documents that were upserted

upsertedId: null | InferIdType<TSchema>

The identifier of the inserted document if an upsert took place