Details
-
Improvement
-
Resolution: Fixed
-
Unknown
-
None
-
None
-
None
-
Not Needed
-
Description
The readconcern package unnecessarily uses the "functional options" pattern which is not used on any other public API. We should remove the functional options pattern and just export all fields in the ReadConcern struct so users can set them directly.
Also, some exported values or functions do not need to be exported:
- ReadConcern.MarshalBSONValue - There is no known use case for this outside of the Go driver.
Definition of done:
- Export all fields in the ReadConcern struct.
- Deprecate the ReadConcern.GetLevel getter.
- Deprecate Option type and all Option functions.
- Deprecate WriteConcern.MarshalBSONValue
Note that all deprecated code will be removed or unexported in Go Driver 2.0.
Attachments
Issue Links
- is depended on by
-
GODRIVER-2696 Allow only 0 or 1 options structs in all APIs that accept variadic options args
-
- Investigating
-
- is related to
-
GODRIVER-964 make option type construction consistent with the options package (e.g. readpref, readconcern, writeconcern)
-
- Closed
-