Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FindAndModifyOptions

Hierarchy

Index

Properties

Optional arrayFilters

arrayFilters: undefined | Document[]

Optional list of array filters referenced in filtered positional operators

Optional authdb

authdb: undefined | string

Optional bypassDocumentValidation

bypassDocumentValidation: undefined | boolean

Allow driver to bypass schema validation in MongoDB 3.2 or higher.

Optional checkKeys

checkKeys: undefined | boolean

the serializer will check if keys are valid.

Optional collation

collation: undefined | CollationOptions

Collation

Optional comment

comment: undefined | string | Document

A user-provided comment to attach to this command

Optional dbName

dbName: undefined | string

Optional explain

explain: undefined | boolean | "queryPlanner" | "queryPlannerExtended" | "executionStats" | "allPlansExecution"

Specifies the verbosity mode for the explain output.

Optional fields

fields: undefined | Document
deprecated

use projection instead

Optional fieldsAsRaw

fieldsAsRaw: undefined | {}

Return document results as raw BSON buffers

Optional fullResponse

fullResponse: undefined | boolean

Return the full server response for the command

Optional hint

hint: undefined | Document

An optional hint for query optimization. See the update command reference for more information.

Optional ignoreUndefined

ignoreUndefined: undefined | boolean

Specify if the BSON serializer should ignore undefined fields

Optional maxTimeMS

maxTimeMS: undefined | number

Optional new

new: undefined | boolean

Optional noResponse

noResponse: undefined | boolean

Optional projection

projection: undefined | Document

Limits the fields to return for all matching documents.

Optional promoteBuffers

promoteBuffers: undefined | boolean

Promotes Binary BSON values to native Node Buffers

Optional promoteLongs

promoteLongs: undefined | boolean

Promotes long values to number if they fit inside the 53 bits resolution

Optional promoteValues

promoteValues: undefined | boolean

Promotes BSON values to native types where possible, set to false to only receive wrapper types

Optional raw

raw: undefined | boolean

Optional readConcern

readConcern: undefined | ReadConcern | { level: "local" | "majority" | "linearizable" | "available" | "snapshot" } | "local" | "majority" | "linearizable" | "available" | "snapshot"

Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported)

Optional readPreference

readPreference: undefined | ReadPreference | "primary" | "primaryPreferred" | "secondary" | "secondaryPreferred" | "nearest"

The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest).

Optional remove

remove: undefined | boolean

Optional retryWrites

retryWrites: undefined | boolean

Should retry failed writes

Optional returnOriginal

returnOriginal: undefined | boolean

When false, returns the updated document rather than the original. The default is true.

Optional serializeFunctions

serializeFunctions: undefined | boolean

Serialize functions on any object

Optional session

session: undefined | ClientSession

Specify ClientSession for this command

Optional sort

sort: undefined | string | string[] | {} | [string, SortDirection][] | [string, SortDirection]

Determines which document the operation modifies if the query selects multiple documents.

Optional update

update: undefined | boolean

Optional upsert

upsert: undefined | boolean

Upsert the document if it does not exist.

Optional willRetryWrites

willRetryWrites: undefined | boolean

Optional writeConcern

writeConcern: undefined | WriteConcern | WriteConcernSettings

Write Concern as an object

Generated using TypeDoc