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: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: API
    • Labels:

      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:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: