Interface ClientUpdateManyModel<TSchema>

interface ClientUpdateManyModel<TSchema> {
    arrayFilters?: Document[];
    collation?: CollationOptions;
    filter: Filter<TSchema>;
    hint?: Hint;
    name: "updateMany";
    namespace: string;
    update: Document[] | UpdateFilter<TSchema>;
    upsert?: boolean;
}

Type Parameters

  • TSchema

Hierarchy (view full)

Properties

arrayFilters?: Document[]

A set of filters specifying to which array elements an update should apply.

collation?: CollationOptions

Specifies a collation.

filter: Filter<TSchema>

The filter used to determine if a document should be updated. For an updateMany operation, all matches are updated.

hint?: Hint

The index to use. If specified, then the query system will only consider plans using the hinted index.

name: "updateMany"
namespace: string

The namespace for the write.

A namespace is a combination of the database name and the name of the collection: <database-name>.<collection>. All documents belong to a namespace.

The modifications to apply. The value can be either: UpdateFilter - A document that contains update operator expressions, Document[] - an aggregation pipeline.

upsert?: boolean

When true, creates a new document if no document matches the query.