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

Add append method for list builder

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.0, 3.7.0-beta1
    • Affects Version/s: None
    • Component/s: None
    • None

      Currently, there's no way to append key-value pairs to a list builder object after construction. We should provide an append method for this case.

      Defining an operator+= method will allow users to stick to the JSON-like syntax on the expression's right-hand side. For example:

      list::builder doc = {"hello", "world"};
      doc += {"foo", "bar"};
      

      instead of

      list::builder doc = {"hello", "world"};
      doc.append({"foo", "bar"});
      

            Assignee:
            clyde.bazile@mongodb.com Clyde Bazile III (Inactive)
            Reporter:
            clyde.bazile@mongodb.com Clyde Bazile III (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: