[GODRIVER-2713] Deprecate "bsonrw.Copier" type and all associated functions Created: 23/Dec/22  Updated: 28/Oct/23  Resolved: 01/Jun/23

Status: Closed
Project: Go Driver
Component/s: BSON
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

Epic Link: Go Driver 2.0 Prep
Quarter: FY24Q1
Documentation Changes: Not 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?
3. Which versions of the driver/connector does this apply to?


 Description   

The bsonrw.Copier type is an empty struct that exposes a collection of functions related to copying BSON or Extended JSON documents. Most of the functions are only used in the BSON library internally. Only the CopyValueToBytes function has known uses outside of the bson package (in the mgocompat package and in ADL code). It's possible that function can be replaced by other functionality already in the bson package. If that's not the case, add a package function called CopyValueToBytes that replaces Copier.CopyValueToBytes.

Definition of done:

  • Deprecate the bsonrw.Copier type and all functions on that type.
  • Deprecate the bsonrw.CopyDocument function.
  • Investigate whether CopyValueToBytes can be replaced by bson.MarshalValue. If so, suggest using that function. If not, add a package function called CopyValueToBytes and suggest using that function instead.
  • Investigate deprecating the bsonrw.BytesWriter and bsonrw.BytesReader interfaces, which may not be necessary if bsonrw.Copier is fully deprecated.


 Comments   
Comment by Githook User [ 01/Jun/23 ]

Author:

{'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}

Message: GODRIVER-2713 Deprecate bsonrw.Copier and related functions and types. (#1281)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/bb98f197b532a095d9131cdd6f9cc2e492358984

Comment by Matt Dale [ 30/May/23 ]

PR: https://github.com/mongodb/mongo-go-driver/pull/1281

Generated at Thu Feb 08 08:39:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.