Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ChangeStreamOptions

Options that can be passed to a ChangeStream. Note that startAfter, resumeAfter, and startAtOperationTime are all mutually exclusive, and the server will error if more than one is specified.

Hierarchy

Index

Properties

Optional allowDiskUse

allowDiskUse: boolean

allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >).

Optional authdb

authdb: string

Optional batchSize

batchSize: number

The number of documents to return per batch. See aggregation documentation.

Optional bsonRegExp

bsonRegExp: boolean

return BSON regular expressions as BSONRegExp instances.

Optional bypassDocumentValidation

bypassDocumentValidation: boolean

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

Optional checkKeys

checkKeys: boolean

the serializer will check if keys are valid.

Optional collation

collation: CollationOptions

Specify collation.

Optional comment

comment: string | Document

A user-provided comment to attach to this command

Optional cursor

cursor: Document

Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor.

Optional dbName

dbName: string

Optional explain

Specifies the verbosity mode for the explain output.

Optional fieldsAsRaw

fieldsAsRaw: Document

allow to specify if there what fields we wish to return as unserialized raw buffer.

Optional fullDocument

fullDocument: string

Allowed values: ‘default’, ‘updateLookup’. When set to ‘updateLookup’, the change stream will include both a delta describing the changes to the document, as well as a copy of the entire document that was changed from some time after the change occurred.

Optional fullResponse

fullResponse: boolean

Return the full server response for the command

Optional hint

hint: Hint

Add an index selection hint to an aggregation command

Optional ignoreUndefined

ignoreUndefined: boolean

serialize will not emit undefined fields (default:true)

Optional let

Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0).

Optional maxAwaitTimeMS

maxAwaitTimeMS: number

The maximum amount of time for the server to wait on new documents to satisfy a change stream query.

Optional maxTimeMS

maxTimeMS: number

specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point.

Optional noResponse

noResponse: boolean

Optional out

out: string

Optional promoteBuffers

promoteBuffers: boolean

when deserializing a Binary will return it as a node.js Buffer instance.

Optional promoteLongs

promoteLongs: boolean

when deserializing a Long will fit it into a Number if it's smaller than 53 bits

Optional promoteValues

promoteValues: boolean

when deserializing will promote BSON values to their Node.js closest equivalent types.

Optional raw

raw: boolean

Return BSON filled buffers from operations

Optional readConcern

readConcern: ReadConcernLike

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

Optional readPreference

readPreference: ReadPreferenceLike

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

Optional resumeAfter

resumeAfter: unknown

Allows you to start a changeStream after a specified event. See ChangeStream documentation.

Optional retryWrites

retryWrites: boolean

Should retry failed writes

Optional serializeFunctions

serializeFunctions: boolean

serialize the javascript functions (default:false).

Optional session

session: ClientSession

Specify ClientSession for this command

Optional startAfter

startAfter: unknown

Similar to resumeAfter, but will allow you to start after an invalidated event. See ChangeStream documentation.

Optional startAtOperationTime

startAtOperationTime: Timestamp

Will start the changeStream after the specified operationTime.

Optional willRetryWrites

willRetryWrites: boolean

Optional writeConcern

Write Concern as an object

Generated using TypeDoc