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-5186)!: remove duplicate BulkWriteResult accessors #3766

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Jul 10, 2023

Description

What is changing?

  • remove duplicate BulkWriteResult accessors
  • Add defaultValue documentation to BulkOptions
  • Remove mention of non-supported server version on bypassDocumentValidation option.
Is there new documentation needed for these changes?

API docs will update in next release

What is the motivation for this change?

Removal of duplicate APIs so there is a single source of truth.

Release Highlight

BulkWriteResult deprecated properties removed

The following deprecated properties have been removed as they duplicated the functionality provided by the common driver spec compliant properties. The list indicates what properties provide the correct migration:

  • BulkWriteResult.nInserted -> BulkWriteResult.insertedCount
  • BulkWriteResult.nUpserted -> BulkWriteResult.upsertedCount
  • BulkWriteResult.nMatched -> BulkWriteResult.matchedCount
  • BulkWriteResult.nModified -> BulkWriteResult.modifiedCount
  • BulkWriteResult.nRemoved -> BulkWriteResult.deletedCount
  • BulkWriteResult.getUpsertedIds -> BulkWriteResult.upsertedIds / BulkWriteResult.getUpsertedIdAt(index: number)
  • BulkWriteResult.getInsertedIds -> BulkWriteResult.insertedIds

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

@nbbeeken
Copy link
Contributor Author

image

Preview of what defaultValue looks like

@W-A-James W-A-James self-assigned this Jul 10, 2023
@W-A-James W-A-James added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jul 10, 2023
W-A-James
W-A-James previously approved these changes Jul 10, 2023
@W-A-James W-A-James added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jul 10, 2023
@W-A-James W-A-James merged commit 8693987 into main Jul 11, 2023
@W-A-James W-A-James deleted the NODE-5186-rm-bulk-dupes branch July 11, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants