This release adds versioned API: a new feature in MongoDB 5.0 that allows user-selectable API versions, subsets of MongoDB server semantics, to be declared on a Client with ServerAPIOptions. See an explanatory blog post here.
ServerAPIOptions can be declared on a Client in the Go driver with SetServerAPIOptions. Within a ServerAPIOptions instance, ServerAPIVersion specifies the declared API version, Strict specifies whether the server should error when it receives a command that is not part of the declared API version, and DeprecationErrors specifies whether the server should error when it receives a command that is deprecated in the declared API version.
The Go driver now supports connecting to any MongoDB service (such as MongoDB Serverless) that is running behind a load balancer.
ClientOptions contains a new LoadBalanced flag that can be set with SetLoadBalanced or by passing loadBalanced=true into the initial URI string.
This release allows the creation of time-series collections: a new collection type that will automatically organize time-series data into buckets on insert, while automatically unwinding the buckets for query purposes.
CreateCollectionOptions contains a new TimeSeriesOptions field that can be set with SetTimeSeries. The fields of TimeSeriesOptions are defined as follows. TimeField specifies the name of the top-level field that will represent the timestamp in the collection's documents. MetaField can specify the name of the top-level field that will describe the series in the collection's documents. Granularity can specify the desired granularity of the time-series data (at present, this value can be "seconds", "minutes" or "hours").
CreateCollectionsOptions also contains a new ExpireAfterSeconds field that can be set with SetExpireAfterSeconds. ExpireAfterSeconds can specify how many seconds to wait before old time-series data should be deleted from the time-series collection.
Let can now be specified on aggregates. See an explanation and examples of the let option in the aggregatedocumentation.
AggregateOptions contains a new Let field that can be set with SetLet.
For a full list of tickets included in this release, please see the links below:
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps go.mongodb.org/mongo-driver from 1.4.0 to 1.6.0.
Release notes
Sourced from go.mongodb.org/mongo-driver's releases.
... (truncated)
Commits
0ad1666
Update version to v1.6.075b6b0b
GODRIVER-1870 Remove insertedCount assertions and improve usage of unsetOrMat...c3b779c
GODRIVER-2051 resync cursor-related tests (#697)d41f348
GODRIVER-1900 add SetBatchSize to driver.BatchCursor (#699)69f9561
GODRIVER-2019 test against 5.0 servers (#687)dbf6945
GODRIVER-2031 Document that Cursor isn't goroutine safe (#696)5199a0b
GODRIVER-2037 Don't clear the connection pool on client-side connect timeout ...6d6365b
GODRIVER-2057 Fix uri merging on options.ClientOptions (#689)fcfd2a3
GODRIVER-2032 bump maxWireVersion (#693)f7a600e
GODRIVER-2033 add let option for aggregate (#690)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)