-
Type: Task
-
Resolution: Won't Fix
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Node.js driver ("mongodb", not "mongoose")
-
Empty show more show less
http://mongodb.github.io/node-mongodb-native/markdown-docs/insert.html
...under "Find and Modify" states:
"callback is the function to run after the update is done. Has two parameters - error object (if error occured) and the record that was updated"
There is also a third parameter passed to the callback. I assume it's getLastError, but it looks like this:
{"value": null, "ok": 1}.
This makes a difference if you're using an asynchronous library like "async".