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

Provide a cleaner API for working with pool entries

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: API
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Currently, you need to use the * or -> operators on a pool::entry to use the underlying client. So it is a little awkward to use when doing client operations (e.g. obtaining a database), e.g. here:

      auto coll = (*client)["test"][collection_names[static_cast<std::size_t>(j)]];
      

      Perhaps instead, the pool::entry could also have an [] operator overload for obtaining the database?

            Assignee:
            julia.garland@mongodb.com Julia Garland (Inactive)
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: