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

Flexible collection creation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0
    • Affects Version/s: None
    • Component/s: API
    • Labels:
      None

      We have a strongly-typed options::create_collection class that doesn't accept flexible BSON options. It has to deprecate fields whenever the server drops them (such as "autoIndexId") and add them whenever the server does (such as "validationLevel"). This also leads to excessive additions to the API; for example, create_view was added in CXX-999 to create non-materialized views, whereas other drivers simply allowed users to pass "viewOn" the same as any other BSON option.

      Deprecate and remove all the strongly-typed fields in options::create_collection and allow an arbitrary document of arguments passed to the createCollection command. The actual options::create_collection class may be deleted or just shrunk, I'm not sure. Deprecate and remove database::create_view, there's no need for a separate member function for that rare use case. (Additionally, options::create_view includes a write concern, documented as "Write concern that will be used when computing the view." I think the server ignores this write concern.)

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: