Skip to content

Commit ce42479

Browse files
committed
updates
1 parent 772af16 commit ce42479

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/migration-2.0.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ mongo.WithSession(context.TODO(),sess,func(ctx context.Context) error {
503503

504504
## Options Package
505505

506-
`ClientOptions.AuthenticateToAnything` was removed in 2.0 (it was marked for internal use in 1.x).
506+
`ClientOptions.AuthenticateToAnything` was removed in v2 (it was marked for internal use in v1).
507507

508508
The following fields were removed because they are no longer supported by the server
509509

@@ -633,13 +633,15 @@ The following types are not valid for a `findOne` operation and have been remove
633633
- `MaxAwaitTime`
634634
- `NoCursorTimeout`
635635
636-
The data type of `ArrayFilters` has been changed to `[]interface{}`, which can be used as the `Filters` field in the original `ArrayFilters` struct.
636+
### FindOneAndUpdateOptions
637+
638+
The `ArrayFilters` struct type has been removed in v2. As a result, the `ArrayFilters` field in the `FindOneAndUpdateOptions` struct now uses the `[]interface{}` type. The `ArrayFilters` field (now of type `[]interface{}`) serves the same purpose as the `Filters` field in the original `ArrayFilters` struct.
637639
638640
### UpdateManyOptions / UpdateOneOptions
639641
640642
The `UpdateOptions` has been separated into `UpdateManyOptions` and `UpdateOneOptions` to configure the corresponding `UpdateMany` and `UpdateOne` operations.
641643
642-
The data type of `ArrayFilters` in the `Update*Options` has been changed to `[]interface{}`, which can be used as the `Filters` field in the original `ArrayFilters` struct.
644+
The `ArrayFilters` struct type has been removed in v2. As a result, the `ArrayFilters` fields in the new `UpdateManyOptions` and `UpdateOneOptions` structs (which replace the old `UpdateOptions` struct) now use the `[]interface{}` type. The `ArrayFilters` field (now of type `[]interface{}`) serves the same purpose as the `Filters` field in the original `ArrayFilters` struct.
643645
644646
### Merge\*Options
645647

0 commit comments

Comments
 (0)