Skip to content

FindOneAndUpdateOptions

Defined in: packages/client/src/types.ts:113

optional projection?: Projection

Defined in: packages/client/src/types.ts:114


optional returnDocument?: "before" | "after"

Defined in: packages/client/src/types.ts:116

Return the document as it was “before” or is “after” the update (default “before”).


optional sort?: Sort

Defined in: packages/client/src/types.ts:110

Which matching document comes first (updateOne, findOneAnd*).

UpdateOptions.sort


optional upsert?: boolean

Defined in: packages/client/src/types.ts:108

Insert a document when nothing matches.

UpdateOptions.upsert


optional writeConcern?: object

Defined in: packages/client/src/types.ts:91

{ w: 'drive' } waits until the change is saved in Google Drive (slower).

optional w?: "log" | "drive"

UpdateOptions.writeConcern

Made by Faeiz Furqan