Skip to content

Commit

Permalink
optional parametter
Browse files Browse the repository at this point in the history
  • Loading branch information
hgourvest committed Nov 8, 2012
1 parent 615505a commit d34a4f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/index.js
Expand Up @@ -910,7 +910,7 @@ Statement.prototype.drop = function(callback) {
Statement.prototype.execute = function(transaction, params, callback){
if (params instanceof Function) {
callback = params;
params = null;
params = undefined;
}
this.connection.executeStatement(transaction, this, params, callback);
};
Expand Down Expand Up @@ -1069,6 +1069,11 @@ Database.prototype.newStatement = function (query, callback) {
};

Database.prototype.execute = function(query, params, callback) {
if (params instanceof Function) {
callback = params;
params = undefined;
}

this.connection.startTransaction(
function(err, transaction) {
if (err) {doError(err, callback); return}
Expand Down

0 comments on commit d34a4f9

Please sign in to comment.