Better comments

pull/2/head
Louis Chatriot 12 years ago
parent a454e3d4ac
commit 5568b3d08e
  1. 6
      lib/datastore.js
  2. 2
      lib/model.js

@ -75,6 +75,8 @@ Datastore.treatRawData = function (rawData) {
/** /**
* Insert a new document * Insert a new document
* @param {Function} cb Optional callback, signature: err, insertedDoc * @param {Function} cb Optional callback, signature: err, insertedDoc
*
* @api private Use Datastore.insert which has the same signature
*/ */
Datastore.prototype._insert = function (newDoc, cb) { Datastore.prototype._insert = function (newDoc, cb) {
var callback = cb || function () {} var callback = cb || function () {}
@ -181,6 +183,8 @@ Datastore.prototype.persistWholeDatabase = function (data, cb) {
* options.multi If true, can update multiple documents (defaults to false) * options.multi If true, can update multiple documents (defaults to false)
* options.upsert If true, document is inserted if the query doesn't match anything * options.upsert If true, document is inserted if the query doesn't match anything
* @param {Function} cb Optional callback, signature: err, numReplaced, upsert (set to true if the update was in fact an upsert) * @param {Function} cb Optional callback, signature: err, numReplaced, upsert (set to true if the update was in fact an upsert)
*
* @api private Use Datastore.update which has the same signature
*/ */
Datastore.prototype._update = function (query, updateQuery, options, cb) { Datastore.prototype._update = function (query, updateQuery, options, cb) {
var callback var callback
@ -246,6 +250,8 @@ Datastore.prototype.update = function () {
* @param {Object} options Optional options * @param {Object} options Optional options
* options.multi If true, can update multiple documents (defaults to false) * options.multi If true, can update multiple documents (defaults to false)
* @param {Function} cb Optional callback, signature: err, numRemoved * @param {Function} cb Optional callback, signature: err, numRemoved
*
* @api private Use Datastore.remove which has the same signature
*/ */
Datastore.prototype._remove = function (query, options, cb) { Datastore.prototype._remove = function (query, options, cb) {
var callback var callback

@ -298,6 +298,8 @@ matcherFunctions.$eq = function (objValue, value) {
/** /**
* Tell if a given document matches a query * Tell if a given document matches a query
* @param {Object} obj Document to check
* @param {Object} query
*/ */
function match (obj, query) { function match (obj, query) {
var match = true var match = true

Loading…
Cancel
Save