Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1408

Add helpers for bsoncore.Document and bsoncore.Array

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:
      None
    • Fully Compatible

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            may.hoque@mongodb.com May Hoque
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: