Skip to content
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

feat(NODE-6419): deprecate explain options API for find and aggregate #4271

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

baileympearson
Copy link
Contributor

Description

What is changing?

collection.find({}, { explain: ... }) and collection/db.aggregate({}, { explain: ... }) are deprecated.

Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Find and Aggregate Explain in Options is Deprecated

Specifying explain for cursors in the operation's options is deprecated in favor of the .explain() methods on cursors:

collection.find({}, { explain: true })
// -> collection.find({}).explain()

collection.aggregate([], { explain: true })
// -> collection.aggregate([]).explain()

db.find([], { explain: true })
// -> db.find([]).explain()

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@W-A-James W-A-James self-assigned this Oct 11, 2024
@W-A-James W-A-James added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Oct 11, 2024
@W-A-James W-A-James self-requested a review October 11, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants