You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/change_stream.js
+15-14Lines changed: 15 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ var cursorOptionNames = ['maxAwaitTimeMS', 'collation', 'readPreference'];
18
18
* @param {object} [options.collation=null] Specify collation settings for operation. See {@link https://docs.mongodb.com/manual/reference/command/aggregate|aggregation documentation}.
19
19
* @param {ReadPreference} [options.readPreference=null] The read preference. Defaults to the read preference of the database or collection. See {@link https://docs.mongodb.com/manual/reference/read-preference|read preference documentation}.
* Fired for each new matching change in the specified namespace. Attaching a 'data' event listener to a Change Stream will switch the stream into flowing mode. Data will then be passed as soon as it is available.
81
+
* 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.
82
82
*
83
-
* @event ChangeStream#data
83
+
* @event ChangeStream#change
84
84
* @type {object}
85
85
*/
86
-
if(self.listenerCount('data')>0){
86
+
if(self.listenerCount('change')>0){
87
87
changeStreamCursor.on('data',function(change){
88
88
processNewChange(self,null,change);
89
89
});
@@ -123,13 +123,13 @@ var createChangeStreamCursor = function (self) {
0 commit comments