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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • API

    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

        Activity

          People

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

            Dates

              Created:
              Updated: