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

GODRIVER-1930 bsoncore Array functions should return Array #626

Merged
merged 2 commits into from
Apr 16, 2021
Merged

GODRIVER-1930 bsoncore Array functions should return Array #626

merged 2 commits into from
Apr 16, 2021

Conversation

benjirewis
Copy link
Contributor

GODRIVER-1930

Changes bsoncore#ReadArray() to return the bsoncore#Array type instead of the bsoncore#Document type, a change that should have been handled in GODRIVER-1846.

This change modifies the return type of bsoncore#Array() and bsoncore#ArrayOK(), which in turn requires some changes to testing and x level code; all small changes 😄 .

@benjirewis benjirewis marked this pull request as ready for review March 29, 2021 21:50
Copy link
Contributor

@divjotarora divjotarora left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for jumping on this quickly.

x/bsonx/bsoncore/document.go Show resolved Hide resolved
Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM!

x/bsonx/bsoncore/array_test.go Show resolved Hide resolved
x/bsonx/bsoncore/document.go Show resolved Hide resolved
@@ -978,38 +978,3 @@ func sortStringAlphebeticAscending(s string) string {
sort.Sort(ss)
return string([]rune(ss))
}

func docAsArray(d Document, debug bool) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, removing this in favor of Array.DebugString / Array.String was a good call.

@benjirewis benjirewis merged commit 5f5f216 into mongodb:master Apr 16, 2021
@benjirewis benjirewis deleted the bsoncoreArrayReturns.1930 branch April 16, 2021 15:49
tsedgwick pushed a commit to mongodb-forks/mongo-go-driver that referenced this pull request May 27, 2021
tsedgwick pushed a commit to mongodb-forks/mongo-go-driver that referenced this pull request Jun 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.

4 participants