coopernurse/node-pool — pull request #39 by wookieb (2012-07-01 13:52:18+00:00)
Title: Adding option to global and local control for adjustCallback

Before commit
```
pool.Pool({
name: 'test',
create: function() { callback({some:'value'}) }
});
pool.acquire(function(client) {
// passing client/result object as first argument of callback
// may confuse flow control modules like node-seq and others
console.log(client.some); // value
});

```

After commit adjustCallback behavior can be controlled.
```

// local configuration
pool.Pool({
create: function() { callback({some:'value'}) },
adjustCallback: false,
name: 'test'
});
pool.acquire(function(){
var error = arguments[0], client = arguments[1];
console.log(error); // undefined
console.log(client.some); // value
});

// global configuration
pool.Pool.adjustCallback(false);
pool.Pool({
name: 'test',
create: function() { callback({some:'value'}) }
});
pool.acquire(function(){
var error = arguments[0], client = arguments[1];
console.log(error); // undefined
console.log(client.some); // value
});

// global flag can be overwritten by local option
pool.Pool.adjustCallback(false);
pool.Pool({
name: 'test',
create: function() { callback({some:'value'}) },
adjustCallback: true
});
pool.acquire(function(client){
console.log(client.some); // value
});
```