Permalink
Browse files

feat: update model and query's execute

  • Loading branch information...
XadillaX committed Oct 17, 2016
1 parent c539243 commit 51ba00b8b1459a1af772a3f2f2a5a0a411f4d662
Showing with 7 additions and 2 deletions.
  1. +3 −2 lib/model.js
  2. +4 −0 lib/query.js
@@ -180,8 +180,9 @@ class ToshihikoModel extends EventEmitter {
return (new Query(this)).delete(callback);
}

execute(sql, format, callback) {
return (new Query(this)).execute(sql, format, callback);
execute() {
const query = new Query(this);
return query.execute.apply(query, arguments);
}

convertColumnToName(object) {
@@ -246,6 +246,10 @@ class ToshihikoQuery {
return callback(err, result, extra);
});
}

execute() {
this.adapter.execute.apply(this.adapter, arguments);
}
}

module.exports = ToshihikoQuery;

0 comments on commit 51ba00b

Please sign in to comment.