ClientUpdateOneModel | mongodb (original) (raw)

Interface ClientUpdateOneModel

Type Parameters

Hierarchy (view full)

Index

Properties

OptionalarrayFilters

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

Optionalcollation

Specifies a collation.

filter

The filter used to determine if a document should be updated. For an updateOne operation, the first match is updated.

Optionalhint

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

name

name: "updateOne"

namespace

namespace: string

update

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

Optionalupsert

upsert?: boolean

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