|
|
@ -27,8 +27,10 @@ function Datastore (filename) { |
|
|
|
* For now this means pulling data out of the data file or creating it |
|
|
|
* For now this means pulling data out of the data file or creating it |
|
|
|
* if it doesn't exist |
|
|
|
* if it doesn't exist |
|
|
|
* @param {Function} cb Optional callback, signature: err |
|
|
|
* @param {Function} cb Optional callback, signature: err |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @api private |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
Datastore.prototype.loadDatabase = function (cb) { |
|
|
|
Datastore.prototype._loadDatabase = function (cb) { |
|
|
|
var callback = cb || function () {} |
|
|
|
var callback = cb || function () {} |
|
|
|
, self = this |
|
|
|
, self = this |
|
|
|
; |
|
|
|
; |
|
|
@ -49,6 +51,9 @@ Datastore.prototype.loadDatabase = function (cb) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Datastore.prototype.loadDatabase = function () { |
|
|
|
|
|
|
|
executor.push({ this: this, fn: this._loadDatabase, arguments: arguments }); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* From a database's raw data, return the corresponding |
|
|
|
* From a database's raw data, return the corresponding |
|
|
|