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

Provide an idiomatic way to create non-materialized views

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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.

            Assignee:
            ezra.chung@mongodb.com Ezra Chung
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: