Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-5816

Allow constructing mongoc_bulkwrite_t without a client

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.30.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Fully Compatible
    • C Drivers
    • Needed
    • Hide

      RST docs for new APIs were included in the PR. There are two new methods: mongoc_bulkwrite_new and mongoc_bulkwrite_set_client.

      There is no need for example syntax.

      Should be included in libmongoc 1.30.

      Show
      RST docs for new APIs were included in the PR. There are two new methods: mongoc_bulkwrite_new and mongoc_bulkwrite_set_client . There is no need for example syntax. Should be included in libmongoc 1.30.

      Implement mongoc_bulkwrite_new() and mongoc_bulkwrite_set_client() in order to allow constructing a mongoc_bulkwrite_t without assigning a client. The internal client and operation_id are not used until mongoc_bulkwrite_execute(), so there is no technical impediment to such an API.

      mongoc_bulkwrite_execute() will also need to be changed to assert or otherwise require that client and operation_id are set at the time it is called.

      This API would follow prior art from mongoc_bulk_operation_t (namely mongoc_bulk_operation_new() and mongoc_bulk_operation_set_client()), which exists for the benefit of wrapping drivers such as PHP.

      Note: I failed to catch this when reviewing the original implementation in mongodb/mongo-c-driver#1590.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: