Skip to content

Commit

Permalink
Remove constructor usage
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfin committed Apr 11, 2015
1 parent 88640a5 commit 6a809bb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
10 changes: 2 additions & 8 deletions lib/bindings/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ module.exports = function () {

return {

/**
* Constructor to set up the state of the connector.
*/
constructor: function() {
this.primary_key = 'primary_key';
},

/**
* This method is called before the server starts to allow the connector to connect to any external
* resources if necessary (such as a Database, etc.).
Expand All @@ -27,7 +20,8 @@ module.exports = function () {
this.config.options || {}
);

this.client.scan = this.client.streamified('SCAN');
this.client.scan =
this.client.streamified('SCAN');

this.client.on('connect', function(){
this.logger.debug('connected');
Expand Down
2 changes: 1 addition & 1 deletion lib/bindings/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function () {
* @param callback to call on completion
*/
getPrimaryKey: function (Model, callback) {
this.client.incr(Model.name + '_' + this.primary_key, function(err, key){
this.client.incr(Model.name + '_primary_key', function(err, key){
callback(err, key + '');
});
},
Expand Down
2 changes: 2 additions & 0 deletions lib/methods/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = function (Arrow) {
});

}.bind(this), function(err, results){

if(err){
return callback(err);
}
Expand All @@ -77,6 +78,7 @@ module.exports = function (Arrow) {
}

callback(null, new Arrow.Collection(Model, filteredResults));

}.bind(this));

}.bind(this));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"async": "^0.9.0",
"hiredis": "^0.3.0",
"lodash": "^2.4.1",
"node-redis-streamify": "^0.1.3",
"node-redis-streamify": "^0.1.5",
"pkginfo": "^0.3.0",
"redis": "^0.12.1"
},
Expand Down

0 comments on commit 6a809bb

Please sign in to comment.