MCPcopy
hub / github.com/mongodb/node-mongodb-native / _setIsIterator

Method _setIsIterator

src/change_stream.ts:888–896  ·  view source on GitHub ↗

@internal

()

Source from the content-addressed store, hash-verified

886
887 /** @internal */
888 private _setIsIterator(): void {
889 if (this.mode === 'emitter') {
890 // TODO(NODE-3485): Replace with MongoChangeStreamModeError
891 throw new MongoAPIError(
892 'ChangeStream cannot be used as an iterator after being used as an EventEmitter'
893 );
894 }
895 this.mode = 'iterator';
896 }
897
898 /**
899 * Create a new change stream cursor based on self's configuration

Callers 3

hasNextMethod · 0.95
nextMethod · 0.95
tryNextMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected