mongoDB 更改操作 格式对比 MySQL update table set .... where .... db.collection.updateOne(query,update,upsert) 修改函数 updateOne 修改首个 db.collection.updateOne(query,update,upsert) 功能 修改第一个复合条件的文档 参数 query 筛选条件,用法同 find update 要修改的数据项, 配合修改操作符 upsert bool类型 设置为 tr