lib/transaction.js
function exec(scope, req, res) {
  var replies = [], item;

  // NOTE: incrby invalid amount will trigger EXECABORT
  // NOTE: wrong number of args are returned to the client
  // NOTE: but other types of validation errors (argument type coercion)
  // NOTE: trigger EXECABORT

  if(this.error) return this.destroy(req, res, ExecAbort);
  if(this.conflict) return this.destroy(req, res, null, null);

  function onReply(err, reply) {
    replies.push(err || reply);
  }

  onReply = onReply.bind(this);

  // fifo queue, maintain order
  while((item = this.queue.shift()) !== undefined) {
    if(item.err) {
      replies.push(item.err);
    }else{
      item.res.cb = onReply;

      // execute via the server so that these command
      // executions are included in slowlog/monitor
      scope.execute(item.req.exec, item.req, item.res);
    }
  }

  // reply and destroy this transaction
  this.destroy(req, res, null, replies);
}
function exec(scope, req, res) {
  var replies = [], item;

  // NOTE: incrby invalid amount will trigger EXECABORT
  // NOTE: wrong number of args are returned to the client
  // NOTE: but other types of validation errors (argument type coercion)
  // NOTE: trigger EXECABORT

  if(this.error) return this.destroy(req, res, ExecAbort);
  if(this.conflict) return this.destroy(req, res, null, null);

  function onReply(err, reply) {
    replies.push(err || reply);
  }

  onReply = onReply.bind(this);

  // fifo queue, maintain order
  while((item = this.queue.shift()) !== undefined) {
    if(item.err) {
      replies.push(item.err);
    }else{
      item.res.cb = onReply;

      // execute via the server so that these command
      // executions are included in slowlog/monitor
      scope.execute(item.req.exec, item.req, item.res);
    }
  }

  // reply and destroy this transaction
  this.destroy(req, res, null, replies);
}
function exec ( scope , req , res ) { var replies = [ ] , item ; // NOTE: incrby invalid amount will trigger EXECABORT // NOTE: wrong number of args are returned to the client // NOTE: but other types of validation errors (argument type coercion) // NOTE: trigger EXECABORT if ( this . error ) return this . destroy ( req , res , ExecAbort ) ; if ( this . conflict ) return this . destroy ( req , res , null , null ) ; function onReply ( err , reply ) { replies . push ( err || reply ) ; } onReply = onReply . bind ( this ) ; // fifo queue, maintain order while ( ( item = this . queue . shift ( ) ) !== undefined ) { if ( item . err ) { replies . push ( item . err ) ; } else { item . res . cb = onReply ; // execute via the server so that these command // executions are included in slowlog/monitor scope . execute ( item . req . exec , item . req , item . res ) ; } } // reply and destroy this transaction this . destroy ( req , res , null , replies ) ; }
Execute this transaction.

@param scope The server scope.
@param req The request created for the exec command.
@param res The response created for the exec command.
Execute this transaction .