`
JadeLuo
  • 浏览: 410956 次
  • 性别: Icon_minigender_1
  • 来自: 珠海
社区版块
存档分类
最新评论

mongoosejs update

 
阅读更多
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

可直接参考源码中的注释

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics