function commit(cb) {
  _connection.commit(function(err) {
    if(err){
      _connection.rollback(function() {
        _connection.release();
        _connection = null;
        cb(err);
      })
    }else{
      _connection && _connection.release();
      _connection = null;
      cb();
    }
  })
}
/**
 * Commit the changes of a current transaction
 * @param {function} cb - The callback
 */
Commit the changes of a current transaction
@param {function} cb - The callback
Commit the changes of a current transaction @param { function } cb - The callback
function commit(cb) {
  _connection.commit(function(err) {
    if(err){
      _connection.rollback(function() {
        _connection.release();
        _connection = null;
        cb(err);
      })
    }else{
      _connection && _connection.release();
      _connection = null;
      cb();
    }
  })
}
function commit ( cb ) { _connection . commit ( function ( err ) { if ( err ) { _connection . rollback ( function ( ) { _connection . release ( ) ; _connection = null ; cb ( err ) ; } ) } else { _connection && _connection . release ( ) ; _connection = null ; cb ( ) ; } } ) }
Commit the changes of a current transaction
 @param {function} cb - The callback
Commit the changes of a current transaction @param { function } cb - The callback