Comparing version 0.15.7 to 0.15.8
@@ -12,3 +12,3 @@ !function(){ | ||
var classDefinition = { | ||
@@ -47,3 +47,3 @@ inherits: database | ||
// query queue (filled while waiting for the transaction | ||
// query queue (filled while waiting for the transaction | ||
// to be created) | ||
@@ -97,3 +97,3 @@ this._queue = []; | ||
*/ | ||
, commit: function(callback) { | ||
, commit: function(callback) { | ||
if (this._transaction) { | ||
@@ -117,2 +117,8 @@ this._transaction.commit(function(err) { | ||
, rollback: function(callback){ | ||
if (!callback) { | ||
callback = function(err){ | ||
log.warn('Rolling back transaction:' + err, err); | ||
}; | ||
} | ||
if (this._transaction) { | ||
@@ -127,4 +133,4 @@ if (debug) log.warn('Rolling back transaction, printing query stack:', this._queries); | ||
else if (this._transaction === false) callback(); | ||
else if (callback) callback(new Error('Cannot rollback! The transaction has already eneded.')); | ||
this._endTransaction(); | ||
else if (callback) callback(new Error('Cannot rollback! The transaction has already eneded.')); | ||
this._endTransaction(); | ||
} | ||
@@ -146,3 +152,3 @@ | ||
callback = configuration.callback; | ||
configuration.callback = function(err, data) { | ||
@@ -203,10 +209,10 @@ if (debug) this._queries.push({query: configuration.query, mode: configuration.mode, err: err, errorMessage: err ? err.message : null, data: data}); | ||
, _endTransaction: function() { | ||
this._transaction = null; | ||
delete this._queue; | ||
this._transaction = null; | ||
delete this._queue; | ||
} | ||
}; | ||
// we need to proxy calls on the | ||
// we need to proxy calls on the | ||
// models to give them the correct scope ... | ||
@@ -213,0 +219,0 @@ Object.keys(database._models).forEach(function(modelName) { |
{ | ||
"name" : "ee-orm" | ||
, "description" : "ORM for postgres and mysql. Loads and saves referenced entites, executes complex queries, supports joins, transactions, complex database clusters, connection pooling and much more. No conventions. MIT Licence" | ||
, "version" : "0.15.7" | ||
, "version" : "0.15.8" | ||
, "homepage" : "https://github.com/eventEmitter/ee-orm" | ||
@@ -6,0 +6,0 @@ , "author" : "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
321352
6232