mongodb修改语句
作者:互联网
-- 修改语句
db.getCollection('T_UserUndoStatus').find({"content":"您有一呼百应消息", "delete" : false,"todoStatus" : "undo"}).forEach(
function(item){
print("_id"+item._id+",content:"+item.content+",account:"+item.account+",todoStatus:"+item.todoStatus)
//db.getCollection('T_UserUndoStatus').update({"_id":item._id},{$set:{"todoStatus":"done"}})
}
)
标签:语句,修改,mongodb,getCollection,content,item,UserUndoStatus,todoStatus,id 来源: https://blog.51cto.com/u_15193673/2850036