[GODRIVER-3071] Correct uint Encoding BSON Documentation Created: 14/Dec/23 Updated: 16/Jan/24 Resolved: 12/Jan/24 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.0, 1.13.2 |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Preston Vasquez | Assignee: | Preston Vasquez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Documentation Changes: | Not Needed |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
ContextThe documentation for the bson package states the following:
The logic for this, added in GODRIVER-1358, is contradictory. The default case for the "min int" condition in the UintCodec is false / nil, which means that an type >= 32-bits will be considered int64. This can also be effected by EncodeContext.MinSize.
Definition of doneThe documentation should be updated to the following:
PitfallsWhat should the implementer watch out for? What are the risks? |
| Comments |
| Comment by Githook User [ 16/Jan/24 ] |
|
Author: {'name': 'Steven Silvester', 'email': 'steven.silvester@ieee.org', 'username': 'blink1073'}Message: Co-authored-by: Preston Vasquez <prestonvasquez@icloud.com> |
| Comment by Githook User [ 12/Jan/24 ] |
|
Author: {'name': 'Preston Vasquez', 'email': 'prestonvasquez@icloud.com', 'username': 'prestonvasquez'}Message: Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com> |
| Comment by KeAna Moutra [ 18/Dec/23 ] |
|
Example usage : https://www.mongodb.com/community/forums/t/mongo-go-driver-uint-always-marshals-to-bson-int64/257633 |