Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1800

Please document the methods of the bulk objects

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.3
    • Affects Version/s: 3.1.10
    • Component/s: Docs

      After reading the documentation at http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#initializeOrderedBulkOp, I wanted to call some updateOne methods on the bulk object returned by initializeUnorderedBulkOp:

      const bulk = collection.initializeUnorderedBulkOp();
      {{bulk.updateOne({ _id: foo }, { $set:

      { bar: "baz" }

      });}}

      However, this resulted in TypeError: bulk.updateOne is not a function.

      I found out from StackOverflow that I need to prefix each operation with "find" (why?).

      The documentation should mention all available methods on the bulk operation types, not just execute:

      http://mongodb.github.io/node-mongodb-native/3.1/api/OrderedBulkOperation.html

      http://mongodb.github.io/node-mongodb-native/3.1/api/UnorderedBulkOperation.html

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            dandv Dan Dascalescu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: