Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

optional parametter

  • Loading branch information...
commit d34a4f9634ed3e364c8961ab350f0d93202f6f56 1 parent 615505a
@hgourvest authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/index.js
View
7 lib/index.js
@@ -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);
};
@@ -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}
Please sign in to comment.
Something went wrong with that request. Please try again.