A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mongodb.github.io/node-mongodb-native/3.6/api/ChangeStream.html below:

Class: ChangeStream

Class: ChangeStream Members

resumeToken

Properties:
Name Type Description resumeToken ResumeToken

The cached resume token that will be used to resume
after the most recently returned change.

Methods

Close the Change Stream

Returns: Promise if no callback passed
hasNext(callback){Promise|void}

Check if there is any document still available in the Change Stream

Throws: Returns: Promise if no callback passed

Is the change stream closed

next(callback){Promise|void}

Get the next available document from the Change Stream, returns null if no more documents are available.

Throws: Returns: Promise if no callback passed

This method will cause a stream in flowing mode to stop emitting data events. Any data that becomes available will remain in the internal buffer.

pipe(destination, options){null}

This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.

Name Type Description destination Writable

The destination for writing data

options object optional

Pipe options

This method will cause the readable stream to resume emitting data events.

Return a modified Readable stream including a possible transform method.

Name Type Description options object optional

Optional settings.

Name Type Description transform function optional

A transformation method applied to each document emitted by the stream.

unpipe(destination){null}

This method will remove the hooks set up for a previous pipe() call.

Name Type Description destination Writable optional

The destination for writing data

Type Definitions
resultCallback(error, result)

The callback format for results

Name Type Description error MongoError

An error instance representing the error during the execution.

result object | null

The result object if the command was executed successfully.

Events

Fired for each new matching change in the specified namespace. Attaching a change
event listener to a Change Stream will switch the stream into flowing mode. Data will
then be passed as soon as it is available.

Type:

Change stream close event

Type:

Change stream end event

Type:

Fired when the stream encounters an error.

Type:

Emitted each time the change stream stores a new resume token.

Type:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4