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

deleteOne documentation

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.33
    • Component/s: None
    • Labels:

      According to the documentation (http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#deleteOne) deleteOne callback returns
      Collection~writeOpCallback

      This is what I get after a successful delete.

      { "ok": 1, "n": 1, "lastOp": "6158896052066844673", "electionId": "550352e08bd852c1048ce106" }

      It doesn't correspond to the description of the result Object (WriteOpResult) as stated in the doc.

      I suppose "n" is the number of deleted documents ? Is "ok" always at 1 , otherwise we have an error object instead ?
      what is "electionId" and lastOp ?

      Thanks

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            FranckL Franck Lahaye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: