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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • Labels:

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            ryan.timmons@mongodb.com Ryan Timmons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: