Skip to content

DOCSP-15571 productize new async writer #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 1, 2022
Merged

DOCSP-15571 productize new async writer #199

merged 5 commits into from
Apr 1, 2022

Conversation

Copy link
Contributor

@jmd-mongo jmd-mongo left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, @davemungo! I've left some comments and questions for you.

Thanks!
Joe

Constructors
~~~~~~~~~~~~

The following constructors will not work:
Copy link
Contributor

Choose a reason for hiding this comment

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

[suggestion]

Consider using the present tense.

Copy link
Author

Choose a reason for hiding this comment

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

Done

return db[ collectionOne ].estimatedDocumentCount() - db[ collectionOne ].estimatedDocumentCount() )
} );

Use ``.map`` instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

[suggestion]

I suggest adding the () for consistency with usage on line 14.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@@ -0,0 +1,104 @@
.. Top level title in calling page, won't render in right TOC

The results of database calls cannot be passed inside the following
Copy link
Contributor

Choose a reason for hiding this comment

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

[question]

Are we expecting users to already be familiar with the terminology "database calls"?

I see we're using .find() ops as an examples throughout -- are there other common types of calls that ought to spring to mind?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I think this page really only applies for users with a fair amount of experience. Changed to 'queries' though as a clarification.

I'm not sure about other operations, I've added findMany(), but that's pretty much the same thing. find() is perhaps the most obvious because it will return data that you want to do something with. I can raise the question on tech review.

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of>`__,
or ``.map()``.

Constructors
Copy link
Contributor

Choose a reason for hiding this comment

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

[praise]

I like the "do not use this approach" vs "instead, use this approach" structure here. Clean!

Copy link
Author

Choose a reason for hiding this comment

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

Thanks!

Generator Functions
~~~~~~~~~~~~~~~~~~~

The following generator functions will not work:
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar comment as line 19.

Copy link
Author

Choose a reason for hiding this comment

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

Done

Array Sort
~~~~~~~~~~

The following array sort will not work:
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar comment as lines 19, 54.

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Author

@ghost ghost left a comment

Choose a reason for hiding this comment

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

@jmd-mongo thanks for your feedback, this is ready for another pass.

@@ -0,0 +1,104 @@
.. Top level title in calling page, won't render in right TOC

The results of database calls cannot be passed inside the following
Copy link
Author

Choose a reason for hiding this comment

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

Yes, I think this page really only applies for users with a fair amount of experience. Changed to 'queries' though as a clarification.

I'm not sure about other operations, I've added findMany(), but that's pretty much the same thing. find() is perhaps the most obvious because it will return data that you want to do something with. I can raise the question on tech review.

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of>`__,
or ``.map()``.

Constructors
Copy link
Author

Choose a reason for hiding this comment

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

Thanks!

Constructors
~~~~~~~~~~~~

The following constructors will not work:
Copy link
Author

Choose a reason for hiding this comment

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

Done

Generator Functions
~~~~~~~~~~~~~~~~~~~

The following generator functions will not work:
Copy link
Author

Choose a reason for hiding this comment

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

Done

Array Sort
~~~~~~~~~~

The following array sort will not work:
Copy link
Author

Choose a reason for hiding this comment

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

Done

return db[ collectionOne ].estimatedDocumentCount() - db[ collectionOne ].estimatedDocumentCount() )
} );

Use ``.map`` instead.
Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@jmd-mongo jmd-mongo left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, @davemungo! This one LGTM.

Thanks,
Joe

@ghost ghost requested a review from addaleax March 31, 2022 16:37
@ghost
Copy link
Author

ghost commented Mar 31, 2022

@addaleax Would you have a look at these updates?

Two technical questions -
Is it ok to say, "database queries" instead of "database calls"?

The examples use a find() query. Does it make sense to show an example with some other sort of query?

Thanks!

Copy link
Collaborator

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Is it ok to say, "database queries" instead of "database calls"?

I think you can do that – but keep in mind that this applies to anything that interacts with the database in some way (for example, commands rather than queries).

The examples use a find() query. Does it make sense to show an example with some other sort of query?

I don’t think you’d need to provide explicit examples here – the limitations and workarounds would apply identically to any other database call (or database query 🙂)

Copy link
Author

@ghost ghost left a comment

Choose a reason for hiding this comment

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

@addaleax Thanks for your feedback. I added a short note about the aysnch alternative.

Copy link
Collaborator

@jason-price-mongodb jason-price-mongodb left a comment

Choose a reason for hiding this comment

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

@davemungo please address mistake and resubmit PR. Cheers.

Array Sort
~~~~~~~~~~

The following array sort do not work:
Copy link
Collaborator

Choose a reason for hiding this comment

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

"does not work"

Copy link
Author

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Thanks @jason-price-mongodb

I've updated "do not" to "does not"

@jason-price-mongodb jason-price-mongodb merged commit 8f11c41 into mongodb:master Apr 1, 2022
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.

4 participants