Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1290

Collection::bulkWrite() should accept a MongoDB\Driver\BulkWrite

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Bulk API
    • None

      The method Collection::bulkWrite() takes a list of operations as first argument. It is an array of array of array as shown by the example: https://github.com/mongodb/mongo-php-library/blob/master/examples/bulk.php

       

      In order to provide a better typing, the method should accept the PHPC model class: MongoDB\Driver\BulkWrite.

      Advantages :

      • DX: developers are guided by the method signatures
      • Performance: Less validation and transformation code to execute in 
        MongoDB\Operation\BulkWrite
      • DX: Leverage the feature of the library client, instead of calling the MongoDB\Driver\Manager directly

            Assignee:
            Unassigned Unassigned
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: