Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1546

Return document::view instead of document::view_or_value from options getters

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.6.0-rc0
    • Component/s: API
    • Labels:

      Description

      In many/most of our options classes we return stdx::optional<bsoncxx::document::view_or_value> e.g. here.

      Change these to return optional<view>.

      The view_or_value type is intended mostly as a parameter/member type. This could easily return an optional<document::view>.

      My reasoning for preferring the latter is that I don't want end users using view_or_value as a vocabulary type - it isn't for them. But returning one here encourages them to start thinking of it as something they should interact with.

      Source this cr

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ryan.timmons Ryan Timmons
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: