[GODRIVER-2685] Simplify "writeconcern" API Created: 11/Dec/22 Updated: 28/Oct/23 Resolved: 14/Jun/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.12.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Matt Dale | Assignee: | Matt Dale |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Epic Link: | Go Driver 2.0 Prep | ||||||||||||||||||||||||||||||||||||
| Quarter: | FY24Q1 | ||||||||||||||||||||||||||||||||||||
| Documentation Changes: | Needed | ||||||||||||||||||||||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? At least the following pages contain examples that should be updated:
3. Which versions of the driver/connector does this apply to? |
||||||||||||||||||||||||||||||||||||
| Description |
|
The writeconcern package and types use a lot of unnecessary APIs that can confuse users. Additionally, there is no shortcut for specifying common write concerns like there is for the readconcern and readpref packages. We should remove the functional options pattern and just export all fields in the WriteConcern struct so users can set them directly. We should add package functions for quickly specifying common write concerns "majority", "w: 0", and "w: 1". Also, some exported values or functions do not need to be exported:
Definition of done:
Note that all deprecated code will be removed or unexported in Go Driver 2.0. |
| Comments |
| Comment by Githook User [ 14/Jun/23 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Matt Dale [ 18/Apr/23 ] |