-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
There is a lot of functionality that appears totally unused in the Go Driver API. We've kept it around to maintain backward compatibility. Mark all of the seemingly unused types and functions as deprecated so we can reduce the negative impact of removing them in Go Driver 2.0.
To deprecate:
- mongo.BSONAppender
- mongo.BSONAppenderFunc
- mongo.CollectionSpecification.UnmarshalBSON
- Replace with an UnmarshalBSON function on the existing unmarshalCollectionSpecification type and convert unmarshalCollectionSpecification into CollectionSpecification in ListCollectionSpecifications.
- gridfs.File.UnmarshalBSON
- Replace with an UnmarshalBSON function on the existing unmarshalFile type and convert unmarshalFile into File in openDownloadStream.
- IndexSpecification.UnmarshalBSON
- Replace with an UnmarshalBSON function on the existing unmarshalIndexSpecification type and convert unmarshalIndexSpecification into IndexSpecification in IndexView.ListSpecifications.
- options.Collation.ToDocument
- options.ArrayFilters.ToArray
- options.ArrayFilters.ToArrayDocument
- options.ArrayFilters.Registry field.
- options.MarshalError type.
- All duplicated BSON type constants in the bsontype package.
- Suggest using types from the bson package.
- primitive.IsValidObjectID
- Suggest using primitive.ObjectIDFromHex.
- bsonrw.BSONValueReaderPool
- Still needed internally, but can be un-exported.
- bsonrw.NewBSONValueReaderPool
- bsonrw.BSONValueWriterPool
- Still needed internally, but can be un-exported.
- bsonrw.NewBSONValueWriterPool
- bsonrw.ExtJSONValueReaderPool
- Still needed internally, but can be un-exported.
- bsonrw.NewExtJSONValueReaderPool
- bsonrw.ExtJSONValueWriterPool
- Still needed internally, but can be un-exported.
- bsonrw.NewExtJSONValueWriterPool
- bsonrw.SliceWriter
- writeconcern.AcknowledgedValue
- bsoncodec.Marshaler
- Use bson.Marshaler instead.
- bsoncodec.Unmarshaler
- Use bson.Unmarshaler instead.
- is depended on by
-
GODRIVER-2367 Un-export all result type BSON unmarshaling functions and BSON struct tags
- Closed
-
GODRIVER-2617 Remove or un-export all currently deprecated code in Go Driver 2.0
- Closed
- is related to
-
GODRIVER-2674 Use time.Duration instead of durationNanos for command monitoring events
- Closed
-
GODRIVER-2681 Replace "primitive.CompareTimestamp" with methods "Before", "After", and "Equal"
- Closed
-
GODRIVER-2684 Deprecate "bson.D.Map"
- Closed
- related to
-
GODRIVER-2682 Rename "bson.NewFromIOReader" to "bson.ReadDocument"
- Closed
-
GODRIVER-2683 Deprecate the "mongo.NewClient" and "Client.Connect" APIs
- Closed