Skip to content

Commit

Permalink
Merge pull request #191 from jiangz222/master
Browse files Browse the repository at this point in the history
mongo official driver to 1.7.1
  • Loading branch information
jiangz222 authored Aug 22, 2021
2 parents 1bffefb + 17def20 commit a0635f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ go 1.16
require (
github.com/go-playground/validator/v10 v10.4.1
github.com/stretchr/testify v1.6.1
go.mongodb.org/mongo-driver v1.5.1
go.mongodb.org/mongo-driver v1.7.1
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
go.mongodb.org/mongo-driver v1.5.1 h1:9nOVLGDfOaZ9R0tBumx/BcuqkbFpyTCU2r/Po7A2azI=
go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw=
go.mongodb.org/mongo-driver v1.7.1 h1:jwqTeEM3x6L9xDXrCxN0Hbg7vdGfPBOTIkr0+/LYZDA=
go.mongodb.org/mongo-driver v1.7.1/go.mod h1:Q4oFMbo1+MSNqICAdYMlC/zSTrwCogR4R8NzkI+yfU8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
Expand Down
10 changes: 5 additions & 5 deletions query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,11 @@ func TestQuery_Distinct(t *testing.T) {
err = cli.Find(context.Background(), filter2).Distinct("age", &res5)
ast.EqualError(err, ErrQueryResultTypeInconsistent.Error())

var res6 []int32

err = cli.Find(context.Background(), filter2).Distinct("", &res6)
ast.NoError(err)
ast.Equal(0, len(res6))
// different behavior with different version of mongod, v4.4.0 return err and v4.0.19 return nil
//var res6 []int32
//err = cli.Find(context.Background(), filter2).Distinct("", &res6)
//ast.Error(err) // (Location40352) FieldPath cannot be constructed with empty string
//ast.Equal(0, len(res6))

var res7 []int32
filter3 := 1
Expand Down

0 comments on commit a0635f5

Please sign in to comment.