Permalink
Browse files

feat: add promise support in query count

  • Loading branch information...
XadillaX committed Oct 19, 2016
1 parent 656c4c5 commit 008bcc8f43e9bbca70898a8ff35d1966c4f5f9b9
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/query.js
@@ -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) {

0 comments on commit 008bcc8

Please sign in to comment.