Skip to content

Commit

Permalink
feat: update model and query's execute
Browse files Browse the repository at this point in the history
  • Loading branch information
XadillaX committed Oct 17, 2016
1 parent c539243 commit 51ba00b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.