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

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Bulk API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: