[GODRIVER-1408] Add helpers for bsoncore.Document and bsoncore.Array Created: 15/Nov/19  Updated: 01/Aug/22

Status: Backlog
Project: Go Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: May Hoque Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to GODRIVER-613 Add bsoncore Builder types Closed
Backwards Compatibility: Fully Compatible

 Description   

There are bunch of repeated snippets of logic surrounding the bsoncore.Document and bsoncore.Array types that internal or lower-level users like the Go team themselves use often.

A lot of examples stem from modifications we wish to make to a complete bsoncore.Document. For example, we may want to add in another field, or for the case of bsoncore.Array, we may want to append one or more elements. These often require slicing off the byte(s?) marking the end of a BSON document, appending the bytes for the new values, and then completing the document again. This not only leaks internal details of BSON that should probably be hidden at this level, but it duplicates logic.


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