"pooled" method to perform function decoration for pooled methods #36

Merged
merged 4 commits into from Jun 18, 2012

Conversation

Projects
None yet
2 participants
Contributor

cosbynator commented Jun 17, 2012

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.

coopernurse added a commit that referenced this pull request Jun 18, 2012

Merge pull request #36 from cosbynator/master
"pooled" method to perform function decoration for pooled methods

@coopernurse coopernurse merged commit df2579e into coopernurse:master Jun 18, 2012

Owner

coopernurse commented Jun 18, 2012

Thanks for the contribution! changes merged, README updated, and new version published to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment