Skip to content

fix: make tryNext and Batch public#2675

Merged
emadum merged 7 commits into
masterfrom
NODE-2952/make-trynext-public
Dec 16, 2020
Merged

fix: make tryNext and Batch public#2675
emadum merged 7 commits into
masterfrom
NODE-2952/make-trynext-public

Conversation

@emadum
Copy link
Copy Markdown
Contributor

@emadum emadum commented Dec 11, 2020

Exposes the tryNext iteration helper on cursors and change streams.

NODE-2952

@emadum emadum marked this pull request as ready for review December 11, 2020 20:39
Comment thread src/change_stream.ts Outdated
Copy link
Copy Markdown
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM with one nitpick. It might also be worth filing a ticket for duplicate maybePromise: ChangeStream#next|tryNext|hasNext all are top-level API which ultimately delegate to the underlying cursor (if possible) so maybePromise is called twice in the happy path. It may be possible to refactor the cursors to allow you to bypass one of those calls

Comment thread src/change_stream.ts Outdated
@emadum emadum requested a review from mbroadst December 15, 2020 19:45
Comment thread test/functional/change_stream.test.js Outdated
Copy link
Copy Markdown
Member

@mbroadst mbroadst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, mod one comment about the use of mocha's --exit

Comment thread package.json Outdated
@emadum emadum merged commit 634ae4f into master Dec 16, 2020
@emadum emadum deleted the NODE-2952/make-trynext-public branch December 16, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants