Permalink
Browse files

fix docs a bit

  • Loading branch information...
1 parent 7192cbf commit 454440b1c08f7d9ca14ce3bb29e840f995fd394f @aheckmann aheckmann committed Aug 23, 2011
Showing with 27 additions and 0 deletions.
  1. +6 −0 lib/document.js
  2. +4 −0 lib/namedscope.js
  3. +17 −0 lib/query.js
View
@@ -583,6 +583,11 @@ Document.prototype.__defineGetter__('modified', function () {
return this._activePaths.some('modify');
});
+/**
+ * Compiles schemas.
+ * @api private
+ */
+
function compile (tree, proto, prefix) {
var keys = Object.keys(tree)
, i = keys.length
@@ -607,6 +612,7 @@ function compile (tree, proto, prefix) {
/**
* Defines the accessor named prop on the incoming prototype.
+ * @api private
*/
function define (prop, subprops, prototype, prefix, keys) {
View
@@ -10,9 +10,13 @@ NamedScope.prototype.where = function () {
};
/**
+ * Decorate
+ *
* @param {NamedScope} target
* @param {Object} getters
+ * @api private
*/
+
NamedScope.prototype.decorate = function (target, getters) {
var name = this.name
, block = this.block
View
@@ -1,3 +1,7 @@
+/**
+ * Module dependencies.
+ */
+
var utils = require('./utils')
, merge = utils.merge
, Promise = require('./promise')
@@ -92,6 +96,14 @@ Query.prototype.exec = function (op, callback) {
return promise;
};
+/**
+ * Finds documents.
+ *
+ * @param {Object} criteria
+ * @param {Function} callback
+ * @api public
+ */
+
Query.prototype.find = function (criteria, callback) {
this.op = 'find';
if ('function' === typeof criteria) {
@@ -233,6 +245,11 @@ Query.prototype.cast = function (model, obj) {
}
};
+/**
+ * Returns default options.
+ * @api private
+ */
+
Query.prototype._optionsForExec = function (model) {
var options = utils.clone(this.options);
if (! ('safe' in options)) options.safe = model.options.safe;

0 comments on commit 454440b

Please sign in to comment.