title: On upsert with Mongo node driver, did it insert or update?
body: <p>I'm using Mongo's native node driver. For an upsert like:</p>
  
  <pre><code>collection.update(query, setData, { upsert: true }, callback);
  </code></pre>
  
  <p>Is there a way to determine if the upsert did an insert or an update? With Mongo shell you can get back <code>WriteResult.nUpserted</code> to determine this, but I'm unsure how to get that info back from the node native driver.
  <a href="http://docs.mongodb.org/manual/reference/method/WriteResult/#WriteResult.nUpserted" rel="nofollow">http://docs.mongodb.org/manual/reference/method/WriteResult/#WriteResult.nUpserted</a></p>
  
  <p>Thanks.</p>