ClientReplaceOneModel | mongodb (original) (raw)

Interface ClientReplaceOneModel

Type Parameters

Hierarchy (view full)

Index

Properties

Optionalcollation

Specifies a collation.

filter

The filter used to determine if a document should be replaced. For a replaceOne operation, the first match is replaced.

Optionalhint

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

name

name: "replaceOne"

namespace

namespace: string

replacement

The document with which to replace the matched document.

Optionalupsert

upsert?: boolean

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