lib/Repository.js
function Repository(T)
{
  var mapper = this._mapper = new Mapper(T);
  this._toMany = function(x) { return mapper.toMany(x); };
  this._toSingle = function(x) { return mapper.toSingle(x); };

  // Implementation pointers
  this._get    = null;
  this._getAll = null;
  this._query  = null;
  this._add    = null;
  this._remove = null;
  this._fetch  = null;
  this._update = null;

  this._transforms = [];
}
function Repository(T)
{
  var mapper = this._mapper = new Mapper(T);
  this._toMany = function(x) { return mapper.toMany(x); };
  this._toSingle = function(x) { return mapper.toSingle(x); };

  // Implementation pointers
  this._get    = null;
  this._getAll = null;
  this._query  = null;
  this._add    = null;
  this._remove = null;
  this._fetch  = null;
  this._update = null;

  this._transforms = [];
}
function Repository ( T ) { var mapper = this . _mapper = new Mapper ( T ) ; this . _toMany = function ( x ) { return mapper . toMany ( x ) ; } ; this . _toSingle = function ( x ) { return mapper . toSingle ( x ) ; } ; // Implementation pointers this . _get = null ; this . _getAll = null ; this . _query = null ; this . _add = null ; this . _remove = null ; this . _fetch = null ; this . _update = null ; this . _transforms = [ ] ; }
A repository pattern that uses a series of sourced providers that attempt to
fire off CRUD-ish methods. Gaurentees a promise-based API and consistent
arity of return values.
@constructor
@param {Function} T
A repository pattern that uses a series of sourced providers that attempt to fire off CRUD - ish methods . Gaurentees a promise - based API and consistent arity of return values .