0
我走過source code of the find() of mongoose.js看,它看起來像如下:什麼「this._find(callback)」是指在Mongoose find()方法中?
Query.prototype.find = function(conditions, callback) {
if (typeof conditions === 'function') {
callback = conditions;
conditions = {};
}
conditions = utils.toObject(conditions);
if (mquery.canMerge(conditions)) {
this.merge(conditions);
}
prepareDiscriminatorCriteria(this);
try {
this.cast(this.model);
this._castError = null;
} catch (err) {
this._castError = err;
}
// if we don't have a callback, then just return the query object
if (!callback) {
return Query.base.find.call(this);
}
this._find(callback);
return this;
};
我真的不明白的部分
this._find(回調);
這是什麼意思? javascript中的_find是什麼?
在此先感謝!
最大
感謝您的幫助! :d –