[CXX-1932] Provide an idiomatic way to create non-materialized views Created: 10/Feb/20  Updated: 01/Feb/23  Resolved: 02/Jun/22

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

Type: Task Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Ezra Chung
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CXX-1577 Flexible collection creation Closed
Epic Link: CXX usability improvements
Quarter: FY24Q3

 Description   

database::create_view was deprecated in 3.4, and it will be removed in 3.5 (CXX-1931).  In the deprecation notes, it said:

To create a non-materialized view, use database::create_collection and pass "viewOn": "COLLECTION_NAME", "pipeline": [ ... stages ... ] in the bsoncxx::document::view_or_value collection_options.

But we don't provide a nice way to pass a bson document as the options to create_collection.  Currently, users will have to build their other create_collection options using the strongly-typed helper methods, then convert their options to a bson document, then append additional values for "viewOn" and "pipeline."  Add a way to support creating a view with create_collection.



 Comments   
Comment by Ezra Chung [ 02/Jun/22 ]

Resolved by CXX-1577.

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