feat: add isactive check for transaction (#164)
This commit is contained in:
parent
61766bb0da
commit
b294519787
|
@ -134,3 +134,10 @@ Transaction.begin = function(connector, options, cb) {
|
|||
});
|
||||
if (cb.promise) return cb.promise;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check whether a transaction has an active connection.
|
||||
*/
|
||||
Transaction.prototype.isActive = function() {
|
||||
return !!this.connection;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue