mongo执行Bulk Update
mongo执行Bulk Update
db.runCommand(
{
update: “users”,
updates: [
{ q: { “userNo”: “10001”}, u: { $set: { “name”: NumberInt(“张三”) }}, multi: false },
{ q: { “userNo”: “10002”}, u: { $set: { “mGradeId”: NumberInt(“李四”) }}, multi: false },
],
ordered: false,
writeConcern: { w: “majority”, wtimeout: 5000 }
}
)