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

XMLWordPrintableJSON

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

      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
            Reporter:
            Ryan Timmons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: