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

Modify BatchCursor to return batch as a single slice of documents

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0-rc1
    • Affects Version/s: None
    • Component/s: Core API
    • None

      BatchCursor currently returns a batch as a slice of BSON documents one after the other. While this works, it requires copying bytes from their array format into a document sequence.

      Add a new type, bsoncore.DocumentSequence, that contains a slice of bytes, boolean indicating if the slice of bytes is a document sequence or a BSON array of documents, and an int32 indicating the position of the start of the next document.

      This type should have a Documents method that will return a []bsoncore.Document. This type should also have a Next method which returns a bsoncore.Document and an error.

            Assignee:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: