Type alias CollectionFindOneAndUpdateOptions

CollectionFindOneAndUpdateOptions: GenericFindOneAndUpdateOptions

Represents the options for the findOneAndUpdate 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

includeResultMetadata - When true, returns alongside the document, an ok field with a value of 1 if the command executed successfully.

Field

timeout - The timeout override for this method

See

Collection.findOneAndUpdate