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

fix database watch function didn't set bsonOpts for changeStreamConfig #1930

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Oldook
Copy link

@Oldook Oldook commented Feb 6, 2025

Summary

Database.Watch() does not pass bsonOpts to changeStreamConfig, while Collection.Watch() and Client.Watch() do.

Background & Motivation

Database.Watch() omits bsonOpts, causing any custom BSON options configured at the client level to be ignored when watching a database. As a result, it is currently necessary to explicitly use bson.Decoder with the required BSON options when decoding change stream events.

@matthewdale matthewdale self-requested a review February 6, 2025 18:41
@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Feb 6, 2025
Copy link
Contributor

API Change Report

No changes found!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant