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

Add getters to options::create_collection/options::create_view/validation_criteria classes, make setters support chaining, deprecate to_document() methods

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.0
    • Affects Version/s: None
    • Component/s: API
    • Labels:
    • Minor Change

      The options::create_collection and options::create_view classes vary from the other options classes in that they embed knowledge of the command request formats for their command (the "create" command).

      We should add getters to these classes, and deprecate their to_document() methods. Once this is done, these classes will be more struct-like and thus more consistent with the other options classes. Knowledge of the command format for "create" could then be moved to the collection class, where it belongs.

      Similar work should be completed for the validation_criteria class. The setters for the validation_criteria class should also support method chaining, for consistency with similar struct-like classes.

      The deprecations added in this ticket will be documentation-only deprecations. The work to add compiler warnings for the newly-deprecated methods will be completed under CXX-1056.

            rassi J Rassi
            rassi J Rassi
            0 Vote for this issue
            1 Start watching this issue