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

Flexible collection creation

    XMLWordPrintable

    Details

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

      Description

      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.)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: