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

Documentation Bug: Node.js update() callback function parameters

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      mongod v2.4.2, Node.js driver version 1.3.6. Windows, Ubuntu.

      Description

      Documentation for "update" at:

      http://mongodb.github.io/node-mongodb-native/markdown-docs/insert.html

      ...says callback takes two parameters. In fact, it takes three (when

      {safe:true}

      ). This makes a difference when running with an async library such as caolan/async.

      The attached go.js shows the JSON representation of the third parameter ("something"):

      n: 1
      something: {
      "updatedExisting": true,
      "n": 1,
      "connectionId": 88,
      "err": null,
      "ok": 1
      }
      dummy: undefined

        Attachments

        1. go.js
          0.9 kB

          Activity

            People

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            harrypehkonen Harry Pehkonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: