当前位置: 首页 > 工具软件 > MongooseJS > 使用案例 >

mongoosejs update

罗宪
2023-12-01
http://mongoosejs.com/docs/api.html#model_Model.update

Model.update = function update (conditions, doc, options, callback) {
  var mq = new Query({}, {}, this, this.collection);
  return mq.update(conditions, doc, options, callback);
};

Parameters:

 

Valid options:

  • safe (boolean) safe mode (defaults to value set in schema (true))
  • upsert (boolean) whether to create the doc if it doesn't match (false)
  • multi (boolean) whether multiple documents should be updated (false)
  • strict (boolean) overrides the strict option for this update
  • overwrite (boolean) disables update-only mode, allowing you to overwrite the doc (false)

C:\Users\admin\Documents\NetBeansProjects\mchat\public_html\node_modules\mongoose\model.js

可直接参考源码中的注释

 类似资料:

相关阅读

相关文章

相关问答