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

Add helpers for bsoncore.Document and bsoncore.Array

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • BSON
    • None
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: