Set name and settings

This commit is contained in:
Raymond Feng 2013-10-04 12:54:14 -07:00
parent ee426b63fc
commit 04bda5c138
2 changed files with 5 additions and 3 deletions

View File

@ -5,8 +5,10 @@ module.exports = Connector;
* methods for connectors than a super class
* @constructor
*/
function Connector() {
function Connector(name, settings) {
this._models = {};
this.name = name;
this.settings = settings || {};
}
/**

View File

@ -21,13 +21,13 @@ function Memory(m) {
this.isTransaction = true;
this.cache = m.cache;
this.ids = m.ids;
this.constructor.super_.apply(this, [].slice.call(arguments));
this.constructor.super_.call(this, 'memory');
this._models = m._models;
} else {
this.isTransaction = false;
this.cache = {};
this.ids = {};
this.constructor.super_.apply(this, [].slice.call(arguments));
this.constructor.super_.call(this, 'memory');
}
}