Support returning sub-documents as values

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON, Performance
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, we frequently need to make copies of BSON data, because we have no way to return a document::value that owns the document, but has a view into a sub-document. If we did, we could do better in situations like this:

      https://github.com/mongodb/mongo-cxx-driver/compare/163227b2753371ff492520c7415df85dfe3b2795...f3e98#diff-0126c1323c6b3fc61cf2eb5c75bd28bfR118

      Here, we have a complete BSON result, but we want to return a document::value that is only a sub-section of the document, for a given field. Since right now you can't have a document::value that owns the whole bson document, but views only a subset, we have no choice but to copy the relevant subset to a new document.

              Assignee:
              Unassigned
              Reporter:
              Andrew Morrow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: