Permalink
Browse files

fix #19

  • Loading branch information...
1 parent 9d903de commit 615505a3459a6e846eefa77fe68afb4c869f1ac6 @hgourvest committed Nov 8, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/index.js
View
@@ -1001,6 +1001,10 @@ Transaction.prototype.execute = function(query, params, callback) {
};
Transaction.prototype.query = function(query, params, callback) {
+ if (params instanceof Function) {
+ callback = params;
+ params = undefined;
+ }
this.execute(query, params, mapFieldNames(callback));
};
@@ -1129,6 +1133,10 @@ function mapFieldNames(callback) {
}
Database.prototype.query = function(query, params, callback) {
+ if (params instanceof Function) {
+ callback = params;
+ params = undefined;
+ }
this.execute(query, params, mapFieldNames(callback));
};

0 comments on commit 615505a

Please sign in to comment.