Maybe a dumb question, how to guarantee your update operation is successful? This is how I did it, but the returned "result" is "false".
import { Mongo } from "meteor/mongo";
const Employees = new Mongo.Collection("Employees");
const result = Employees.update({_id: employeeId}, {$push: {tasks: taskId}});
console.log(result); // "false"
Thanks
Derek
All depends what you class as successful? If you take a look at WriteConcern you can get results for acknowledgments, write to journal or writes to a number of nodes with the cluster. This will all depend on your application and how it can deal with failures.
As for getting the number of effected rows you can use the call back on the update method (see the API documentation)