lib/database.js
function proxy(req, res) {
  var method = req.db[req.cmd]
    , args;

  // append the request object to the args
  // required so that database events can pass
  // request and thereby connection information
  // when emitting events by key, this allows
  // transactional semantics
  args = req.args.slice(0).concat(req);
  return method.apply(req.db, args);
}
function proxy(req, res) {
  var method = req.db[req.cmd]
    , args;

  // append the request object to the args
  // required so that database events can pass
  // request and thereby connection information
  // when emitting events by key, this allows
  // transactional semantics
  args = req.args.slice(0).concat(req);
  return method.apply(req.db, args);
}
function proxy ( req , res ) { var method = req . db [ req . cmd ] , args ; // append the request object to the args // required so that database events can pass // request and thereby connection information // when emitting events by key, this allows // transactional semantics args = req . args . slice ( 0 ) . concat ( req ) ; return method . apply ( req . db , args ) ; }
Proxy command execution to a database method.

This method returns the reply from the database method
but does not send a reply to a client.

Sometimes command implementations may wish to operate on the reply
before returning to the client, typically to coerce a database response.

@param req The incoming request.
@param res The outbound response.
Proxy command execution to a database method .