Skip to content

Commit

Permalink
Bump go.mongodb.org/mongo-driver from 1.12.1 to 1.13.0 (#111)
Browse files Browse the repository at this point in the history
* Bump go.mongodb.org/mongo-driver from 1.12.1 to 1.13.0

Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.12.1 to 1.13.0.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](mongodb/mongo-go-driver@v1.12.1...v1.13.0)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* add missing interfaces:
  - `SingleResult.Raw`
  - `SearchIndexView`
  - `Cursor.SetComment`
  - `Cursor.SetMaxTime`
  - `Collection.SearchIndexes`

* update mocks

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
  • Loading branch information
dependabot[bot] and SVilgelm committed Nov 14, 2023
1 parent 922a839 commit 98ee5c2
Show file tree
Hide file tree
Showing 11 changed files with 709 additions and 3 deletions.
6 changes: 6 additions & 0 deletions collection.go
Expand Up @@ -62,6 +62,7 @@ type Collection interface {
replacement interface{},
opts ...*options.ReplaceOptions,
) (*mongo.UpdateResult, error)
SearchIndexes() SearchIndexView
UpdateByID(
ctx context.Context,
id interface{},
Expand Down Expand Up @@ -239,6 +240,11 @@ func (c *collection) ReplaceOne(
return c.co.ReplaceOne(ctx, filter, replacement, opts...)
}

func (c *collection) SearchIndexes() SearchIndexView {
siv := c.co.SearchIndexes()
return wrapSearchIndexView(&siv)
}

func (c *collection) UpdateByID(
ctx context.Context,
id interface{},
Expand Down
11 changes: 11 additions & 0 deletions cursor.go
Expand Up @@ -2,6 +2,7 @@ package mongoifc

import (
"context"
"time"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
Expand All @@ -20,6 +21,8 @@ type Cursor interface {
Next(ctx context.Context) bool
RemainingBatchLength() int
SetBatchSize(batchSize int32)
SetComment(comment interface{})
SetMaxTime(dur time.Duration)
TryNext(ctx context.Context) bool
}

Expand Down Expand Up @@ -59,6 +62,14 @@ func (c *cursor) RemainingBatchLength() int {
return c.cr.RemainingBatchLength()
}

func (c *cursor) SetComment(comment interface{}) {
c.cr.SetComment(comment)
}

func (c *cursor) SetMaxTime(dur time.Duration) {
c.cr.SetMaxTime(dur)
}

func (c *cursor) TryNext(ctx context.Context) bool {
return c.cr.TryNext(ctx)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/stretchr/testify v1.8.4
go.mongodb.org/mongo-driver v1.12.1
go.mongodb.org/mongo-driver v1.13.0
go.uber.org/mock v0.3.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -28,8 +28,8 @@ github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gi
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE=
go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ=
go.mongodb.org/mongo-driver v1.13.0 h1:67DgFFjYOCMWdtTEmKFpV3ffWlFnh+CYZ8ZS/tXWUfY=
go.mongodb.org/mongo-driver v1.13.0/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
53 changes: 53 additions & 0 deletions mocks/gomock/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions mocks/mockery/collection.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions mocks/mockery/cursor.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 98ee5c2

Please sign in to comment.