[CXX-1546] Return document::view instead of document::view_or_value from options getters Created: 04/Apr/18  Updated: 08/Feb/23

Status: Backlog
Project: C++ Driver
Component/s: API
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ryan Timmons Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: internal-woes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CXX-1827 Reduce friction between view and valu... Backlog
Epic Link: CXX ABI
Quarter: FY24Q1

 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


Generated at Wed Feb 07 22:03:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.