coopernurse/node-pool — pull request #36 by cosbynator (2012-06-17 02:12:19+00:00)
Title: "pooled" method to perform function decoration for pooled methods

Hi there,

I've created a branch that introduces a method on object pools called `pooled()`. This acts as a python-style function decorator, that wraps methods in code that will auto-acquire on call, and auto-release on callback. The general idea is described in the README.md of my branch, and in my blog post here: http://blog.argteam.com/coding/connection-pooling-with-node-postgres/ (the version in my branch is much more robust than the blog post).

This pattern has greatly simplified re-using methods within transactions and has cleaned up my code a lot. Let me know what you think.