Skip to content

GODRIVER-2133 Error on semantic single documents as aggregate pipelines #721

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
Sep 1, 2021
Merged

GODRIVER-2133 Error on semantic single documents as aggregate pipelines #721

merged 5 commits into from
Sep 1, 2021

Conversation

benjirewis
Copy link
Contributor

@benjirewis benjirewis commented Aug 24, 2021

GODRIVER-2133

Modifies transformAggregatePipeline to error if the provided pipeline is a non-empty semantically a single document (bson.D, bson.Raw, bsoncore.Document) but is implemented as a slice. This will stop users from passing something like bson.D{{"x", 1}} as a pipeline since it is not strictly speaking an array of documents and give them an informative error message.

@benjirewis benjirewis requested a review from matthewdale August 30, 2021 16:32
@benjirewis benjirewis marked this pull request as ready for review August 30, 2021 16:33
@benjirewis benjirewis requested a review from matthewdale August 31, 2021 16:25
Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@benjirewis benjirewis merged commit 3a0c0a5 into mongodb:master Sep 1, 2021
@benjirewis benjirewis deleted the noSingleDocPipelines.2133 branch September 1, 2021 18:26
benjirewis added a commit that referenced this pull request Sep 1, 2021
faem pushed a commit to kubedb/mongo-go-driver that referenced this pull request Mar 17, 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.

2 participants