Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: add promise support in query count
  • Loading branch information
XadillaX committed Oct 19, 2016
1 parent 656c4c5 commit 008bcc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/query.js
Expand Up @@ -152,9 +152,11 @@ class ToshihikoQuery {
}

count(callback) {
callback = common.promisify(callback);
this.adapter.count(this, function(err, count, extra) {
return callback(err, count, extra);
});
return callback.promise;
}

find(callback, toJSON, options) {
Expand Down

0 comments on commit 008bcc8

Please sign in to comment.