mongo-go-driver icon indicating copy to clipboard operation
mongo-go-driver copied to clipboard

GODRIVER-2696 Use an options pattern that doesn't require merging structs

Open prestonvasquez opened this issue 1 year ago • 1 comments

GODRIVER-2696

Summary

This PR implements the proposed solution described here in the POC PR #1480 with the intention of updating the options pattern to abstract merging.

Background & Motivation

To avoid creating merge function for each option type, the goal of 2696 is to find and implement an optional arguments pattern that doesn't require maintaining dedicated code for merging each type of option struct together when multiple options structs are provided.

prestonvasquez avatar Feb 29 '24 00:02 prestonvasquez

API Change Report

##! second, different message for obj type ./mongo/options.DefaultIndexOptions struct{StorageEngine interface{}}, isNew false, part "" first: old is comparable, new is not second: changed from DefaultIndexOptions to DefaultIndexOptions ##! second, different message for obj type ./mongo/options.RangeOptions struct{Min *./bson.RawValue; Max *./bson.RawValue; Sparsity int64; Precision *int32}, isNew false, part "" first: old is comparable, new is not second: changed from RangeOptions to RangeOptions ##! second, different message for obj type ./mongo/options.TimeSeriesOptions struct{TimeField string; MetaField *string; Granularity *string; BucketMaxSpan *time.Duration; BucketRounding *time.Duration}, isNew false, part "" first: old is comparable, new is not second: changed from TimeSeriesOptions to TimeSeriesOptions ##! second, different message for obj type ./mongo/options.NameOptions struct{Revision *int32}, isNew false, part "" first: old is comparable, new is not second: removed ##! second, different message for obj type ./mongo/options.UploadOptions struct{ChunkSizeBytes *int32; Metadata interface{}; Registry *./bson.Registry}, isNew false, part "" first: old is comparable, new is not second: removed

./mongo

incompatible changes

##(Client).Database: changed from func(string, ..../mongo/options.DatabaseOptions) *Database to func(string, ..../mongo/options.Lister[./mongo/options.DatabaseOptions]) *Database ##(Client).ListDatabaseNames: changed from func(context.Context, interface{}, ..../mongo/options.ListDatabasesOptions) ([]string, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ListDatabasesOptions]) ([]string, error) ##(Client).ListDatabases: changed from func(context.Context, interface{}, ..../mongo/options.ListDatabasesOptions) (ListDatabasesResult, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ListDatabasesOptions]) (ListDatabasesResult, error) ##(Client).StartSession: changed from func(..../mongo/options.SessionOptions) (*Session, error) to func(..../mongo/options.Lister[./mongo/options.SessionOptions]) (*Session, error) ##(*Client).UseSessionWithOptions: changed from func(context.Context, *./mongo/options.SessionOptions, func(context.Context) error) error to func(context.Context, *./mongo/options.SessionOptionsBuilder, func(context.Context) error) error ##(Client).Watch: changed from func(context.Context, interface{}, ..../mongo/options.ChangeStreamOptions) (*ChangeStream, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ChangeStreamOptions]) (*ChangeStream, error) ##(ClientEncryption).CreateDataKey: changed from func(context.Context, string, ..../mongo/options.DataKeyOptions) (./bson.Binary, error) to func(context.Context, string, ..../mongo/options.Lister[./mongo/options.DataKeyOptions]) (./bson.Binary, error) ##(*ClientEncryption).CreateEncryptedCollection: changed from func(context.Context, *Database, string, *./mongo/options.CreateCollectionOptions, string, interface{}) (*Collection, ./bson.M, error) to func(context.Context, *Database, string, ./mongo/options.Lister[./mongo/options.CreateCollectionOptions], string, interface{}) (*Collection, ./bson.M, error) ##(ClientEncryption).Encrypt: changed from func(context.Context, ./bson.RawValue, ..../mongo/options.EncryptOptions) (./bson.Binary, error) to func(context.Context, ./bson.RawValue, ..../mongo/options.Lister[./mongo/options.EncryptOptions]) (./bson.Binary, error) ##(ClientEncryption).EncryptExpression: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.EncryptOptions) error to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.EncryptOptions]) error ##(ClientEncryption).RewrapManyDataKey: changed from func(context.Context, interface{}, ..../mongo/options.RewrapManyDataKeyOptions) (*RewrapManyDataKeyResult, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.RewrapManyDataKeyOptions]) (*RewrapManyDataKeyResult, error) ##(Collection).Aggregate: changed from func(context.Context, interface{}, ..../mongo/options.AggregateOptions) (*Cursor, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.AggregateOptions]) (*Cursor, error) ##(Collection).BulkWrite: changed from func(context.Context, []WriteModel, ..../mongo/options.BulkWriteOptions) (*BulkWriteResult, error) to func(context.Context, []WriteModel, ..../mongo/options.Lister[./mongo/options.BulkWriteOptions]) (*BulkWriteResult, error) ##(Collection).Clone: changed from func(..../mongo/options.CollectionOptions) *Collection to func(..../mongo/options.Lister[./mongo/options.CollectionOptions]) *Collection ##(Collection).CountDocuments: changed from func(context.Context, interface{}, ..../mongo/options.CountOptions) (int64, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.CountOptions]) (int64, error) ##(Collection).DeleteMany: changed from func(context.Context, interface{}, ..../mongo/options.DeleteOptions) (*DeleteResult, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.DeleteOptions]) (*DeleteResult, error) ##(Collection).DeleteOne: changed from func(context.Context, interface{}, ..../mongo/options.DeleteOptions) (*DeleteResult, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.DeleteOptions]) (*DeleteResult, error) ##(Collection).Distinct: changed from func(context.Context, string, interface{}, ..../mongo/options.DistinctOptions) *DistinctResult to func(context.Context, string, interface{}, ..../mongo/options.Lister[./mongo/options.DistinctOptions]) *DistinctResult ##(Collection).Drop: changed from func(context.Context, ..../mongo/options.DropCollectionOptions) error to func(context.Context, ..../mongo/options.Lister[./mongo/options.DropCollectionOptions]) error ##(Collection).EstimatedDocumentCount: changed from func(context.Context, ..../mongo/options.EstimatedDocumentCountOptions) (int64, error) to func(context.Context, ..../mongo/options.Lister[./mongo/options.EstimatedDocumentCountOptions]) (int64, error) ##(Collection).Find: changed from func(context.Context, interface{}, ..../mongo/options.FindOptions) (*Cursor, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.FindOptions]) (*Cursor, error) ##(Collection).FindOne: changed from func(context.Context, interface{}, ..../mongo/options.FindOneOptions) *SingleResult to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.FindOneOptions]) *SingleResult ##(Collection).FindOneAndDelete: changed from func(context.Context, interface{}, ..../mongo/options.FindOneAndDeleteOptions) *SingleResult to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.FindOneAndDeleteOptions]) *SingleResult ##(Collection).FindOneAndReplace: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.FindOneAndReplaceOptions) *SingleResult to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.FindOneAndReplaceOptions]) *SingleResult ##(Collection).FindOneAndUpdate: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.FindOneAndUpdateOptions) *SingleResult to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.FindOneAndUpdateOptions]) *SingleResult ##(Collection).InsertMany: changed from func(context.Context, interface{}, ..../mongo/options.InsertManyOptions) (*InsertManyResult, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.InsertManyOptions]) (*InsertManyResult, error) ##(Collection).InsertOne: changed from func(context.Context, interface{}, ..../mongo/options.InsertOneOptions) (*InsertOneResult, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.InsertOneOptions]) (*InsertOneResult, error) ##(Collection).ReplaceOne: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.ReplaceOptions) (*UpdateResult, error) to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.ReplaceOptions]) (*UpdateResult, error) ##(Collection).UpdateByID: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.UpdateOptions) (*UpdateResult, error) to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.UpdateOptions]) (*UpdateResult, error) ##(Collection).UpdateMany: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.UpdateOptions) (*UpdateResult, error) to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.UpdateOptions]) (*UpdateResult, error) ##(Collection).UpdateOne: changed from func(context.Context, interface{}, interface{}, ..../mongo/options.UpdateOptions) (*UpdateResult, error) to func(context.Context, interface{}, interface{}, ..../mongo/options.Lister[./mongo/options.UpdateOptions]) (*UpdateResult, error) ##(Collection).Watch: changed from func(context.Context, interface{}, ..../mongo/options.ChangeStreamOptions) (*ChangeStream, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ChangeStreamOptions]) (*ChangeStream, error) ##(Database).Aggregate: changed from func(context.Context, interface{}, ..../mongo/options.AggregateOptions) (*Cursor, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.AggregateOptions]) (*Cursor, error) ##(Database).Collection: changed from func(string, ..../mongo/options.CollectionOptions) *Collection to func(string, ..../mongo/options.Lister[./mongo/options.CollectionOptions]) *Collection ##(Database).CreateCollection: changed from func(context.Context, string, ..../mongo/options.CreateCollectionOptions) error to func(context.Context, string, ..../mongo/options.Lister[./mongo/options.CreateCollectionOptions]) error ##(Database).CreateView: changed from func(context.Context, string, string, interface{}, ..../mongo/options.CreateViewOptions) error to func(context.Context, string, string, interface{}, ..../mongo/options.Lister[./mongo/options.CreateViewOptions]) error ##(Database).GridFSBucket: changed from func(..../mongo/options.BucketOptions) *GridFSBucket to func(..../mongo/options.Lister[./mongo/options.BucketOptions]) *GridFSBucket ##(Database).ListCollectionNames: changed from func(context.Context, interface{}, ..../mongo/options.ListCollectionsOptions) ([]string, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ListCollectionsOptions]) ([]string, error) ##(Database).ListCollectionSpecifications: changed from func(context.Context, interface{}, ..../mongo/options.ListCollectionsOptions) ([]CollectionSpecification, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ListCollectionsOptions]) ([]CollectionSpecification, error) ##(Database).ListCollections: changed from func(context.Context, interface{}, ..../mongo/options.ListCollectionsOptions) (*Cursor, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ListCollectionsOptions]) (*Cursor, error) ##(Database).RunCommand: changed from func(context.Context, interface{}, ..../mongo/options.RunCmdOptions) *SingleResult to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.RunCmdOptions]) *SingleResult ##(Database).RunCommandCursor: changed from func(context.Context, interface{}, ..../mongo/options.RunCmdOptions) (*Cursor, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.RunCmdOptions]) (*Cursor, error) ##(Database).Watch: changed from func(context.Context, interface{}, ..../mongo/options.ChangeStreamOptions) (*ChangeStream, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.ChangeStreamOptions]) (*ChangeStream, error) ##(GridFSBucket).DownloadToStreamByName: changed from func(context.Context, string, io.Writer, ..../mongo/options.NameOptions) (int64, error) to func(context.Context, string, io.Writer, ..../mongo/options.Lister[./mongo/options.GridFSNameOptions]) (int64, error) ##(GridFSBucket).Find: changed from func(context.Context, interface{}, ..../mongo/options.GridFSFindOptions) (*Cursor, error) to func(context.Context, interface{}, ..../mongo/options.Lister[./mongo/options.GridFSFindOptions]) (*Cursor, error) ##(GridFSBucket).OpenDownloadStreamByName: changed from func(context.Context, string, ..../mongo/options.NameOptions) (*GridFSDownloadStream, error) to func(context.Context, string, ..../mongo/options.Lister[./mongo/options.GridFSNameOptions]) (*GridFSDownloadStream, error) ##(GridFSBucket).OpenUploadStream: changed from func(context.Context, string, ..../mongo/options.UploadOptions) (*GridFSUploadStream, error) to func(context.Context, string, ..../mongo/options.Lister[./mongo/options.GridFSUploadOptions]) (*GridFSUploadStream, error) ##(GridFSBucket).OpenUploadStreamWithID: changed from func(context.Context, interface{}, string, ..../mongo/options.UploadOptions) (GridFSUploadStream, error) to func(context.Context, interface{}, string, ..../mongo/options.Lister[./mongo/options.GridFSUploadOptions]) (GridFSUploadStream, error) ##(GridFSBucket).UploadFromStream: changed from func(context.Context, string, io.Reader, ..../mongo/options.UploadOptions) (./bson.ObjectID, error) to func(context.Context, string, io.Reader, ..../mongo/options.Lister[./mongo/options.GridFSUploadOptions]) (./bson.ObjectID, error) ##(GridFSBucket).UploadFromStreamWithID: changed from func(context.Context, interface{}, string, io.Reader, ..../mongo/options.UploadOptions) error to func(context.Context, interface{}, string, io.Reader, ..../mongo/options.Lister[./mongo/options.GridFSUploadOptions]) error ##(Session).StartTransaction: changed from func(..../mongo/options.TransactionOptions) error to func(..../mongo/options.Lister[./mongo/options.TransactionOptions]) error ##(Session).WithTransaction: changed from func(context.Context, func(ctx context.Context) (interface{}, error), ..../mongo/options.TransactionOptions) (interface{}, error) to func(context.Context, func(ctx context.Context) (interface{}, error), ..../mongo/options.Lister[./mongo/options.TransactionOptions]) (interface{}, error) ##Connect: changed from func(..../mongo/options.ClientOptions) (Client, error) to func(..../mongo/options.Lister[./mongo/options.ClientOptions]) (Client, error) ##IndexModel.Options: changed from ./mongo/options.IndexOptions to ./mongo/options.IndexOptionsBuilder ##IndexView.CreateMany: changed from func(context.Context, []IndexModel, ..../mongo/options.CreateIndexesOptions) ([]string, error) to func(context.Context, []IndexModel, ..../mongo/options.Lister[./mongo/options.CreateIndexesOptions]) ([]string, error) ##IndexView.CreateOne: changed from func(context.Context, IndexModel, ..../mongo/options.CreateIndexesOptions) (string, error) to func(context.Context, IndexModel, ..../mongo/options.Lister[./mongo/options.CreateIndexesOptions]) (string, error) ##IndexView.DropAll: changed from func(context.Context, ..../mongo/options.DropIndexesOptions) error to func(context.Context, ..../mongo/options.Lister[./mongo/options.DropIndexesOptions]) error ##IndexView.DropOne: changed from func(context.Context, string, ..../mongo/options.DropIndexesOptions) error to func(context.Context, string, ..../mongo/options.Lister[./mongo/options.DropIndexesOptions]) error ##IndexView.List: changed from func(context.Context, ..../mongo/options.ListIndexesOptions) (*Cursor, error) to func(context.Context, ..../mongo/options.Lister[./mongo/options.ListIndexesOptions]) (Cursor, error) ##IndexView.ListSpecifications: changed from func(context.Context, ..../mongo/options.ListIndexesOptions) ([]IndexSpecification, error) to func(context.Context, ..../mongo/options.Lister[./mongo/options.ListIndexesOptions]) ([]IndexSpecification, error) ##NewClientEncryption: changed from func(Client, ..../mongo/options.ClientEncryptionOptions) (*ClientEncryption, error) to func(*Client, ..../mongo/options.Lister[./mongo/options.ClientEncryptionOptions]) (ClientEncryption, error) ##SearchIndexModel.Options: changed from ./mongo/options.SearchIndexesOptions to ./mongo/options.SearchIndexesOptionsBuilder ##SearchIndexView.CreateMany: changed from func(context.Context, []SearchIndexModel, ..../mongo/options.CreateSearchIndexesOptions) ([]string, error) to func(context.Context, []SearchIndexModel, ..../mongo/options.Lister[./mongo/options.CreateSearchIndexesOptions]) ([]string, error) ##SearchIndexView.CreateOne: changed from func(context.Context, SearchIndexModel, ..../mongo/options.CreateSearchIndexesOptions) (string, error) to func(context.Context, SearchIndexModel, ..../mongo/options.Lister[./mongo/options.CreateSearchIndexesOptions]) (string, error) ##SearchIndexView.DropOne: changed from func(context.Context, string, ..../mongo/options.DropSearchIndexOptions) error to func(context.Context, string, ..../mongo/options.Lister[./mongo/options.DropSearchIndexOptions]) error ##SearchIndexView.List: changed from func(context.Context, ./mongo/options.SearchIndexesOptions, ..../mongo/options.ListSearchIndexesOptions) (*Cursor, error) to func(context.Context, ./mongo/options.Lister[./mongo/options.SearchIndexesOptions], ..../mongo/options.Lister[./mongo/options.ListSearchIndexesOptions]) (Cursor, error) ##SearchIndexView.UpdateOne: changed from func(context.Context, string, interface{}, ..../mongo/options.UpdateSearchIndexOptions) error to func(context.Context, string, interface{}, ..../mongo/options.Lister[./mongo/options.UpdateSearchIndexOptions]) error

./mongo/options

incompatible changes

(*AggregateOptions).SetAllowDiskUse: removed (*AggregateOptions).SetBatchSize: removed (*AggregateOptions).SetBypassDocumentValidation: removed (*AggregateOptions).SetCollation: removed (*AggregateOptions).SetComment: removed (*AggregateOptions).SetCustom: removed (*AggregateOptions).SetHint: removed (*AggregateOptions).SetLet: removed (*AggregateOptions).SetMaxAwaitTime: removed (*AutoEncryptionOptions).SetBypassAutoEncryption: removed (*AutoEncryptionOptions).SetBypassQueryAnalysis: removed (*AutoEncryptionOptions).SetEncryptedFieldsMap: removed (*AutoEncryptionOptions).SetExtraOptions: removed (*AutoEncryptionOptions).SetKeyVaultClientOptions: removed (*AutoEncryptionOptions).SetKeyVaultNamespace: removed (*AutoEncryptionOptions).SetKmsProviders: removed (*AutoEncryptionOptions).SetSchemaMap: removed (*AutoEncryptionOptions).SetTLSConfig: removed (*BucketOptions).SetChunkSizeBytes: removed (*BucketOptions).SetName: removed (*BucketOptions).SetReadConcern: removed (*BucketOptions).SetReadPreference: removed (*BucketOptions).SetWriteConcern: removed (*BulkWriteOptions).SetBypassDocumentValidation: removed (*BulkWriteOptions).SetComment: removed (*BulkWriteOptions).SetLet: removed (*BulkWriteOptions).SetOrdered: removed (*ChangeStreamOptions).SetBatchSize: removed (*ChangeStreamOptions).SetCollation: removed (*ChangeStreamOptions).SetComment: removed (*ChangeStreamOptions).SetCustom: removed (*ChangeStreamOptions).SetCustomPipeline: removed (*ChangeStreamOptions).SetFullDocument: removed (*ChangeStreamOptions).SetFullDocumentBeforeChange: removed (*ChangeStreamOptions).SetMaxAwaitTime: removed (*ChangeStreamOptions).SetResumeAfter: removed (*ChangeStreamOptions).SetShowExpandedEvents: removed (*ChangeStreamOptions).SetStartAfter: removed (*ChangeStreamOptions).SetStartAtOperationTime: removed (*ClientEncryptionOptions).SetKeyVaultNamespace: removed (*ClientEncryptionOptions).SetKmsProviders: removed (*ClientEncryptionOptions).SetTLSConfig: removed (*ClientOptions).ApplyURI: removed (*ClientOptions).SetAppName: removed (*ClientOptions).SetAuth: removed (*ClientOptions).SetAutoEncryptionOptions: removed (*ClientOptions).SetBSONOptions: removed (*ClientOptions).SetCompressors: removed (*ClientOptions).SetConnectTimeout: removed (*ClientOptions).SetDialer: removed (*ClientOptions).SetDirect: removed (*ClientOptions).SetDisableOCSPEndpointCheck: removed (*ClientOptions).SetHTTPClient: removed (*ClientOptions).SetHeartbeatInterval: removed (*ClientOptions).SetHosts: removed (*ClientOptions).SetLoadBalanced: removed (*ClientOptions).SetLocalThreshold: removed (*ClientOptions).SetLoggerOptions: removed (*ClientOptions).SetMaxConnIdleTime: removed (*ClientOptions).SetMaxConnecting: removed (*ClientOptions).SetMaxPoolSize: removed (*ClientOptions).SetMinPoolSize: removed (*ClientOptions).SetMonitor: removed (*ClientOptions).SetPoolMonitor: removed (*ClientOptions).SetReadConcern: removed (*ClientOptions).SetReadPreference: removed (*ClientOptions).SetRegistry: removed (*ClientOptions).SetReplicaSet: removed (*ClientOptions).SetRetryReads: removed (*ClientOptions).SetRetryWrites: removed (*ClientOptions).SetSRVMaxHosts: removed (*ClientOptions).SetSRVServiceName: removed (*ClientOptions).SetServerAPIOptions: removed (*ClientOptions).SetServerMonitor: removed (*ClientOptions).SetServerMonitoringMode: removed (*ClientOptions).SetServerSelectionTimeout: removed (*ClientOptions).SetTLSConfig: removed (*ClientOptions).SetTimeout: removed (*ClientOptions).SetWriteConcern: removed (*ClientOptions).SetZlibLevel: removed (*ClientOptions).SetZstdLevel: removed (*ClientOptions).Validate: removed (*CollectionOptions).SetBSONOptions: removed (*CollectionOptions).SetReadConcern: removed (*CollectionOptions).SetReadPreference: removed (*CollectionOptions).SetRegistry: removed (*CollectionOptions).SetWriteConcern: removed (*CountOptions).SetCollation: removed (*CountOptions).SetComment: removed (*CountOptions).SetHint: removed (*CountOptions).SetLimit: removed (*CountOptions).SetSkip: removed (*CreateCollectionOptions).SetCapped: removed (*CreateCollectionOptions).SetChangeStreamPreAndPostImages: removed (*CreateCollectionOptions).SetClusteredIndex: removed (*CreateCollectionOptions).SetCollation: removed (*CreateCollectionOptions).SetDefaultIndexOptions: removed (*CreateCollectionOptions).SetEncryptedFields: removed (*CreateCollectionOptions).SetExpireAfterSeconds: removed (*CreateCollectionOptions).SetMaxDocuments: removed (*CreateCollectionOptions).SetSizeInBytes: removed (*CreateCollectionOptions).SetStorageEngine: removed (*CreateCollectionOptions).SetTimeSeriesOptions: removed (*CreateCollectionOptions).SetValidationAction: removed (*CreateCollectionOptions).SetValidationLevel: removed (*CreateCollectionOptions).SetValidator: removed (*CreateIndexesOptions).SetCommitQuorumInt: removed (*CreateIndexesOptions).SetCommitQuorumMajority: removed (*CreateIndexesOptions).SetCommitQuorumString: removed (*CreateIndexesOptions).SetCommitQuorumVotingMembers: removed (*CreateViewOptions).SetCollation: removed (*DataKeyOptions).SetKeyAltNames: removed (*DataKeyOptions).SetKeyMaterial: removed (*DataKeyOptions).SetMasterKey: removed (*DatabaseOptions).SetBSONOptions: removed (*DatabaseOptions).SetReadConcern: removed (*DatabaseOptions).SetReadPreference: removed (*DatabaseOptions).SetRegistry: removed (*DatabaseOptions).SetWriteConcern: removed (*DeleteOptions).SetCollation: removed (*DeleteOptions).SetComment: removed (*DeleteOptions).SetHint: removed (*DeleteOptions).SetLet: removed (*DistinctOptions).SetCollation: removed (*DistinctOptions).SetComment: removed (*DropCollectionOptions).SetEncryptedFields: removed (*EncryptOptions).SetAlgorithm: removed (*EncryptOptions).SetContentionFactor: removed (*EncryptOptions).SetKeyAltName: removed (*EncryptOptions).SetKeyID: removed (*EncryptOptions).SetQueryType: removed (*EncryptOptions).SetRangeOptions: removed (*EstimatedDocumentCountOptions).SetComment: removed (*FindOneAndDeleteOptions).SetCollation: removed (*FindOneAndDeleteOptions).SetComment: removed (*FindOneAndDeleteOptions).SetHint: removed (*FindOneAndDeleteOptions).SetLet: removed (*FindOneAndDeleteOptions).SetProjection: removed (*FindOneAndDeleteOptions).SetSort: removed (*FindOneAndReplaceOptions).SetBypassDocumentValidation: removed (*FindOneAndReplaceOptions).SetCollation: removed (*FindOneAndReplaceOptions).SetComment: removed (*FindOneAndReplaceOptions).SetHint: removed (*FindOneAndReplaceOptions).SetLet: removed (*FindOneAndReplaceOptions).SetProjection: removed (*FindOneAndReplaceOptions).SetReturnDocument: removed (*FindOneAndReplaceOptions).SetSort: removed (*FindOneAndReplaceOptions).SetUpsert: removed (*FindOneAndUpdateOptions).SetArrayFilters: removed (*FindOneAndUpdateOptions).SetBypassDocumentValidation: removed (*FindOneAndUpdateOptions).SetCollation: removed (*FindOneAndUpdateOptions).SetComment: removed (*FindOneAndUpdateOptions).SetHint: removed (*FindOneAndUpdateOptions).SetLet: removed (*FindOneAndUpdateOptions).SetProjection: removed (*FindOneAndUpdateOptions).SetReturnDocument: removed (*FindOneAndUpdateOptions).SetSort: removed (*FindOneAndUpdateOptions).SetUpsert: removed (*FindOneOptions).SetAllowPartialResults: removed (*FindOneOptions).SetCollation: removed (*FindOneOptions).SetComment: removed (*FindOneOptions).SetHint: removed (*FindOneOptions).SetMax: removed (*FindOneOptions).SetMin: removed (*FindOneOptions).SetProjection: removed (*FindOneOptions).SetReturnKey: removed (*FindOneOptions).SetShowRecordID: removed (*FindOneOptions).SetSkip: removed (*FindOneOptions).SetSort: removed (*FindOptions).SetAllowDiskUse: removed (*FindOptions).SetAllowPartialResults: removed (*FindOptions).SetBatchSize: removed (*FindOptions).SetCollation: removed (*FindOptions).SetComment: removed (*FindOptions).SetCursorType: removed (*FindOptions).SetHint: removed (*FindOptions).SetLet: removed (*FindOptions).SetLimit: removed (*FindOptions).SetMax: removed (*FindOptions).SetMaxAwaitTime: removed (*FindOptions).SetMin: removed (*FindOptions).SetNoCursorTimeout: removed (*FindOptions).SetProjection: removed (*FindOptions).SetReturnKey: removed (*FindOptions).SetShowRecordID: removed (*FindOptions).SetSkip: removed (*FindOptions).SetSort: removed (*GridFSFindOptions).SetAllowDiskUse: removed (*GridFSFindOptions).SetBatchSize: removed (*GridFSFindOptions).SetLimit: removed (*GridFSFindOptions).SetNoCursorTimeout: removed (*GridFSFindOptions).SetSkip: removed (*GridFSFindOptions).SetSort: removed (*IndexOptions).SetBits: removed (*IndexOptions).SetBucketSize: removed (*IndexOptions).SetCollation: removed (*IndexOptions).SetDefaultLanguage: removed (*IndexOptions).SetExpireAfterSeconds: removed (*IndexOptions).SetHidden: removed (*IndexOptions).SetLanguageOverride: removed (*IndexOptions).SetMax: removed (*IndexOptions).SetMin: removed (*IndexOptions).SetName: removed (*IndexOptions).SetPartialFilterExpression: removed (*IndexOptions).SetSparse: removed (*IndexOptions).SetSphereVersion: removed (*IndexOptions).SetStorageEngine: removed (*IndexOptions).SetTextVersion: removed (*IndexOptions).SetUnique: removed (*IndexOptions).SetVersion: removed (*IndexOptions).SetWeights: removed (*IndexOptions).SetWildcardProjection: removed (*InsertManyOptions).SetBypassDocumentValidation: removed (*InsertManyOptions).SetComment: removed (*InsertManyOptions).SetOrdered: removed (*InsertOneOptions).SetBypassDocumentValidation: removed (*InsertOneOptions).SetComment: removed (*ListCollectionsOptions).SetAuthorizedCollections: removed (*ListCollectionsOptions).SetBatchSize: removed (*ListCollectionsOptions).SetNameOnly: removed (*ListDatabasesOptions).SetAuthorizedDatabases: removed (*ListDatabasesOptions).SetNameOnly: removed (*ListIndexesOptions).SetBatchSize: removed (*LoggerOptions).SetComponentLevel: removed (*LoggerOptions).SetMaxDocumentLength: removed (*LoggerOptions).SetSink: removed (*ReplaceOptions).SetBypassDocumentValidation: removed (*ReplaceOptions).SetCollation: removed (*ReplaceOptions).SetComment: removed (*ReplaceOptions).SetHint: removed (*ReplaceOptions).SetLet: removed (*ReplaceOptions).SetUpsert: removed (*RewrapManyDataKeyOptions).SetMasterKey: removed (*RewrapManyDataKeyOptions).SetProvider: removed (*RunCmdOptions).SetReadPreference: removed (*SearchIndexesOptions).SetName: removed (*SearchIndexesOptions).SetType: removed (*ServerAPIOptions).SetDeprecationErrors: removed (*ServerAPIOptions).SetStrict: removed (*SessionOptions).SetCausalConsistency: removed (*SessionOptions).SetDefaultReadConcern: removed (*SessionOptions).SetDefaultReadPreference: removed (*SessionOptions).SetDefaultWriteConcern: removed (*SessionOptions).SetSnapshot: removed (*TransactionOptions).SetReadConcern: removed (*TransactionOptions).SetReadPreference: removed (*TransactionOptions).SetWriteConcern: removed (*UpdateOptions).SetArrayFilters: removed (*UpdateOptions).SetBypassDocumentValidation: removed (*UpdateOptions).SetCollation: removed (*UpdateOptions).SetComment: removed (*UpdateOptions).SetHint: removed (*UpdateOptions).SetLet: removed (*UpdateOptions).SetUpsert: removed Aggregate: changed from func() *AggregateOptions to func() *AggregateOptionsBuilder AutoEncryption: changed from func() *AutoEncryptionOptions to func() *AutoEncryptionOptionsBuilder AutoEncryptionOptions.KeyVaultClientOptions: changed from *ClientOptions to Lister[ClientOptions] BulkWrite: changed from func() *BulkWriteOptions to func() *BulkWriteOptionsBuilder ChangeStream: changed from func() *ChangeStreamOptions to func() *ChangeStreamOptionsBuilder Client: changed from func() *ClientOptions to func() *ClientOptionsBuilder ClientEncryption: changed from func() *ClientEncryptionOptions to func() *ClientEncryptionOptionsBuilder ClientOptions.AutoEncryptionOptions: changed from *AutoEncryptionOptions to Lister[AutoEncryptionOptions] ClientOptions.LoggerOptions: changed from *LoggerOptions to Lister[LoggerOptions] ClientOptions.ServerAPIOptions: changed from *ServerAPIOptions to Lister[ServerAPIOptions] Collection: changed from func() *CollectionOptions to func() *CollectionOptionsBuilder Count: changed from func() *CountOptions to func() *CountOptionsBuilder CreateCollection: changed from func() *CreateCollectionOptions to func() *CreateCollectionOptionsBuilder CreateIndexes: changed from func() *CreateIndexesOptions to func() *CreateIndexesOptionsBuilder CreateView: changed from func() *CreateViewOptions to func() *CreateViewOptionsBuilder DataKey: changed from func() *DataKeyOptions to func() *DataKeyOptionsBuilder Database: changed from func() *DatabaseOptions to func() *DatabaseOptionsBuilder DefaultIndexOptions.StorageEngine: removed DefaultIndexOptions: changed from DefaultIndexOptions to DefaultIndexOptions Delete: changed from func() *DeleteOptions to func() *DeleteOptionsBuilder Distinct: changed from func() *DistinctOptions to func() *DistinctOptionsBuilder DropCollection: changed from func() *DropCollectionOptions to func() *DropCollectionOptionsBuilder DropIndexes: changed from func() *DropIndexesOptions to func() *DropIndexesOptionsBuilder Encrypt: changed from func() *EncryptOptions to func() *EncryptOptionsBuilder EstimatedDocumentCount: changed from func() *EstimatedDocumentCountOptions to func() *EstimatedDocumentCountOptionsBuilder Find: changed from func() *FindOptions to func() *FindOptionsBuilder FindOne: changed from func() *FindOneOptions to func() *FindOneOptionsBuilder FindOneAndDelete: changed from func() *FindOneAndDeleteOptions to func() *FindOneAndDeleteOptionsBuilder FindOneAndReplace: changed from func() *FindOneAndReplaceOptions to func() *FindOneAndReplaceOptionsBuilder FindOneAndUpdate: changed from func() *FindOneAndUpdateOptions to func() *FindOneAndUpdateOptionsBuilder GridFSBucket: changed from func() *BucketOptions to func() *BucketOptionsBuilder GridFSFind: changed from func() *GridFSFindOptions to func() *GridFSFindOptionsBuilder Index: changed from func() *IndexOptions to func() *IndexOptionsBuilder InsertMany: changed from func() *InsertManyOptions to func() *InsertManyOptionsBuilder InsertOne: changed from func() *InsertOneOptions to func() *InsertOneOptionsBuilder ListCollections: changed from func() *ListCollectionsOptions to func() *ListCollectionsOptionsBuilder ListDatabases: changed from func() *ListDatabasesOptions to func() *ListDatabasesOptionsBuilder ListIndexes: changed from func() *ListIndexesOptions to func() *ListIndexesOptionsBuilder ListSearchIndexesOptions.AggregateOpts: removed Logger: changed from func() *LoggerOptions to func() *LoggerOptionsBuilder MergeClientOptions: removed MergeDropCollectionOptions: removed NameOptions.Revision: removed NameOptions: removed RangeOptions.Max: removed RangeOptions.Min: removed RangeOptions.Precision: removed RangeOptions.Sparsity: removed RangeOptions: changed from RangeOptions to RangeOptions Replace: changed from func() *ReplaceOptions to func() *ReplaceOptionsBuilder RewrapManyDataKey: changed from func() *RewrapManyDataKeyOptions to func() *RewrapManyDataKeyOptionsBuilder RunCmd: changed from func() *RunCmdOptions to func() *RunCmdOptionsBuilder SearchIndexes: changed from func() *SearchIndexesOptions to func() *SearchIndexesOptionsBuilder ServerAPI: changed from func(ServerAPIVersion) *ServerAPIOptions to func(ServerAPIVersion) *ServerAPIOptionsBuilder Session: changed from func() *SessionOptions to func() *SessionOptionsBuilder TimeSeriesOptions.BucketMaxSpan: removed TimeSeriesOptions.BucketRounding: removed TimeSeriesOptions.Granularity: removed TimeSeriesOptions.MetaField: removed TimeSeriesOptions.TimeField: removed TimeSeriesOptions: changed from TimeSeriesOptions to TimeSeriesOptions Transaction: changed from func() *TransactionOptions to func() *TransactionOptionsBuilder Update: changed from func() *UpdateOptions to func() *UpdateOptionsBuilder UploadOptions.ChunkSizeBytes: removed UploadOptions.Metadata: removed UploadOptions.Registry: removed UploadOptions: removed

compatible changes

(*DefaultIndexOptionsBuilder).List: added (*GridFSNameOptionsBuilder).List: added (*GridFSUploadOptionsBuilder).List: added (*GridFSUploadOptionsBuilder).SetRegistry: added (*RangeOptionsBuilder).List: added (*TimeSeriesOptionsBuilder).List: added AggregateOptionsBuilder: added AutoEncryptionOptionsBuilder: added BucketOptionsBuilder: added BulkWriteOptionsBuilder: added ChangeStreamOptionsBuilder: added ClientEncryptionOptionsBuilder: added ClientOptionsBuilder: added CollectionOptionsBuilder: added CountOptionsBuilder: added CreateCollectionOptionsBuilder: added CreateIndexesOptionsBuilder: added CreateSearchIndexesOptionsBuilder: added CreateViewOptionsBuilder: added DataKeyOptionsBuilder: added DatabaseOptionsBuilder: added DefaultIndexOptions.Opts: added DefaultIndexOptionsBuilder: added DeleteOptionsBuilder: added DistinctOptionsBuilder: added DropCollectionOptionsBuilder: added DropIndexesOptionsBuilder: added DropSearchIndexOptionsBuilder: added EncryptOptionsBuilder: added EstimatedDocumentCountOptionsBuilder: added FindOneAndDeleteOptionsBuilder: added FindOneAndReplaceOptionsBuilder: added FindOneAndUpdateOptionsBuilder: added FindOneOptionsBuilder: added FindOptionsBuilder: added GridFSFindOptionsBuilder: added GridFSNameOptions: added GridFSNameOptionsBuilder: added GridFSUploadOptions: added GridFSUploadOptionsBuilder: added IndexOptionsBuilder: added InsertManyOptionsBuilder: added InsertOneOptionsBuilder: added ListCollectionsOptionsBuilder: added ListDatabasesOptionsBuilder: added ListIndexesOptionsBuilder: added ListSearchIndexesOptions.AggregateOptions: added ListSearchIndexesOptionsBuilder: added Lister: added LoggerOptionsBuilder: added NameOptions.Opts: added Range: added RangeOptions.Opts: added RangeOptionsBuilder: added ReplaceOptionsBuilder: added RewrapManyDataKeyOptionsBuilder: added RunCmdOptionsBuilder: added SearchIndexesOptionsBuilder: added ServerAPIOptionsBuilder: added SessionOptionsBuilder: added TimeSeriesOptions.Opts: added TimeSeriesOptionsBuilder: added TransactionOptionsBuilder: added UpdateOptionsBuilder: added UpdateSearchIndexOptionsBuilder: added UploadOptions.Opts: added

./x/mongo/driver/topology

incompatible changes

##ConvertToDriverAPIOptions: changed from func(*./mongo/options.ServerAPIOptions) *./x/mongo/driver.ServerAPIOptions to func(./mongo/options.Lister[./mongo/options.ServerAPIOptions]) ./x/mongo/driver.ServerAPIOptions ##NewConfig: changed from func(./mongo/options.ClientOptions, *./x/mongo/driver/session.ClusterClock) (Config, error) to func(./mongo/options.ClientOptionsBuilder, *./x/mongo/driver/session.ClusterClock) (*Config, error)

compatible changes

NewConfigFromOptions: added