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

Add to Cursor a way to append document bytes to a slice

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • 0.0.7
    • CRUD
    • None

    Description

      Currently the way a Cursor is implemented the DecodeBytes method returns the bytes directly from the slice underlying the cursor. While this is a slice allocated for the wire message response, it can be large since we use one slice for all of the documents returned from the cursor. Adding a AppendDecodeBytes or DecodeBytesAppend method that takes a []byte would allow users to not have to do a copy themselves when they want bytes. This method would work similar to the other Append methods where the bytes are copied into the slice and the slice is grown if the capacity is not large enough.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: