Skip to content

Commit e2b76fa

Browse files
committed
feat(NODE-7441): add ChangeStream.bufferedCount
1 parent cfb0bbd commit e2b76fa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/change_stream.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,11 @@ export class ChangeStream<
705705
return this.cursor?.resumeToken;
706706
}
707707

708+
/** Returns the currently buffered documents length of the underlying cursor. */
709+
get bufferedCount(): number | undefined {
710+
return this.cursor?.bufferedCount();
711+
}
712+
708713
/** Check if there is any document still available in the Change Stream */
709714
async hasNext(): Promise<boolean> {
710715
this._setIsIterator();

0 commit comments

Comments
 (0)