Type alias CollectionFindOneAndReplaceOptions

CollectionFindOneAndReplaceOptions: GenericFindOneAndReplaceOptions

Represents the options for the findOneAndReplace command.

Field

returnDocument - Specifies whether to return the original or updated document.

Field

upsert - If true, perform an insert if no documents match the filter.

Field

sort - The sort order to pick which document to replace if the filter selects multiple documents.

Field

projection - Specifies which fields should be included/excluded in the returned documents.

Field

timeout - The timeout override for this method

See

Collection.findOneAndReplace